/[cvs]/nfo/php/libs/org.netfrag.flib/Site.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Site.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by joko, Fri Dec 13 09:17:41 2002 UTC revision 1.4 by joko, Thu Dec 19 16:25:29 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------------  //    -------------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.4  2002/12/19 16:25:29  joko
7    //    + function loadCmsPage($template, $data_merge = array())
8    //
9    //    Revision 1.3  2002/12/19 06:17:32  joko
10    //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)
11    //
12  //    Revision 1.2  2002/12/13 09:17:41  joko  //    Revision 1.2  2002/12/13 09:17:41  joko
13  //    + function getLastRequest  //    + function getLastRequest
14  //    + function cacheRequest  //    + function cacheRequest
# Line 60  class Site extends Site_Boot { Line 66  class Site extends Site_Boot {
66      $this->_init_logger();      $this->_init_logger();
67      $this->_init_helpers();      $this->_init_helpers();
68      $this->_init_application();      $this->_init_application();
69      //$this->_init_database();      $this->_init_database();
70        $this->_init_smarty();
71        $this->_init_lt();
72    }    }
73    
74    // Dispatchers for all subobjects    // Dispatchers for all subobjects
# Line 107  class Site extends Site_Boot { Line 115  class Site extends Site_Boot {
115    function &loadPage($a) {    function &loadPage($a) {
116      return $this->loader->loadPage($a);      return $this->loader->loadPage($a);
117    }    }
118      function &loadTemplate($a, $b = array(), $c = "") {
119        return $this->loader->loadTemplate($a, $b, $c);
120      }
121    
122    // dispatchers for Http    // dispatchers for Http
123    function &redirect($a) {    function &redirect($a) {
# Line 145  class Site extends Site_Boot { Line 156  class Site extends Site_Boot {
156      }      }
157    }    }
158        
159      function loadCmsPage($template, $data_merge = array()) {
160        
161    //print Dumper($this->getRequest());
162        
163        // default data to provide to scope of cms
164        // TODO/REVIEW: should we be more strict here?
165        // e.g. just pass in '$site->config->url' or s.th.l.th.
166        $data = array(
167          'config' => $this->config,
168          'request' => $this->getRequest(),
169        );
170        
171        // merge in additional data
172        foreach ($data_merge as $key => $val) {
173          $data[$key] = $val;
174        }
175        
176        // load template
177        $this->loadTemplate($template, $data);
178        
179      }
180      
181  }  }
182    
183  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed