/[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.1 by joko, Tue Nov 12 05:42:30 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
13    //    + function getLastRequest
14    //    + function cacheRequest
15    //
16  //    Revision 1.1  2002/11/12 05:42:30  joko  //    Revision 1.1  2002/11/12 05:42:30  joko
17  //    + initial checkin  //    + initial checkin
18  //  //
# Line 56  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 88  class Site extends Site_Boot { Line 100  class Site extends Site_Boot {
100      return $this->request->getRequest();      return $this->request->getRequest();
101    }    }
102    
103      function getLastRequest() {
104        return $this->request->getCached();
105      }
106    
107      function cacheRequest($request = array()) {
108        return $this->request->cacheRequest($request);
109      }
110    
111    // dispatchers for Loader    // dispatchers for Loader
112    function &loadHandler($a) {    function &loadHandler($a) {
113      return $this->loader->loadHandler($a);      return $this->loader->loadHandler($a);
# Line 95  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 133  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.1  
changed lines
  Added in v.1.4

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