/[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.5 by jonen, Mon Dec 23 11:33:58 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -------------------------------------------------------------------------------  //    -------------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.5  2002/12/23 11:33:58  jonen
7    //    + minor changes
8    //
9    //    Revision 1.4  2002/12/19 16:25:29  joko
10    //    + function loadCmsPage($template, $data_merge = array())
11    //
12    //    Revision 1.3  2002/12/19 06:17:32  joko
13    //    + database, smarty, and langtext (lt) now gets initialized here (on Site startup)
14    //
15    //    Revision 1.2  2002/12/13 09:17:41  joko
16    //    + function getLastRequest
17    //    + function cacheRequest
18    //
19  //    Revision 1.1  2002/11/12 05:42:30  joko  //    Revision 1.1  2002/11/12 05:42:30  joko
20  //    + initial checkin  //    + initial checkin
21  //  //
# Line 56  class Site extends Site_Boot { Line 69  class Site extends Site_Boot {
69      $this->_init_logger();      $this->_init_logger();
70      $this->_init_helpers();      $this->_init_helpers();
71      $this->_init_application();      $this->_init_application();
72      //$this->_init_database();      $this->_init_database();
73        $this->_init_smarty();
74        $this->_init_lt();
75    }    }
76    
77    // Dispatchers for all subobjects    // Dispatchers for all subobjects
# Line 88  class Site extends Site_Boot { Line 103  class Site extends Site_Boot {
103      return $this->request->getRequest();      return $this->request->getRequest();
104    }    }
105    
106      function getLastRequest() {
107        return $this->request->getCached();
108      }
109    
110      function cacheRequest($request = array()) {
111        return $this->request->cacheRequest($request);
112      }
113    
114    // dispatchers for Loader    // dispatchers for Loader
115    function &loadHandler($a) {    function &loadHandler($a) {
116      return $this->loader->loadHandler($a);      return $this->loader->loadHandler($a);
117    }    }
118    function &loadPage($a) {    function &loadPage($a, $b = array()) {
119      return $this->loader->loadPage($a);      return $this->loader->loadPage($a, $b);
120      }
121      function &loadTemplate($a, $b = array(), $c = "") {
122        return $this->loader->loadTemplate($a, $b, $c);
123    }    }
124    
125    // dispatchers for Http    // dispatchers for Http
# Line 133  class Site extends Site_Boot { Line 159  class Site extends Site_Boot {
159      }      }
160    }    }
161        
162      function loadCmsPage($template, $data_merge = array()) {
163        
164    //print Dumper($this->getRequest());
165        
166        // default data to provide to scope of cms
167        // TODO/REVIEW: should we be more strict here?
168        // e.g. just pass in '$site->config->url' or s.th.l.th.
169        $data = array(
170          'config' => $this->config,
171          'request' => $this->getRequest(),
172        );
173        
174        // merge in additional data
175        foreach ($data_merge as $key => $val) {
176          $data[$key] = $val;
177        }
178        
179        // load template
180        $this->loadTemplate($template, $data);
181        
182      }
183      
184  }  }
185    
186  ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

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