Next4Me
 All Data Structures Files Functions
application/Bootstrap.php
00001 <?php
00002 function p($misc,$exit=false){
00003     echo "<pre class='p'>".print_r($misc,true)."</pre>";
00004     if($exit) exit;
00005 }
00006 
00007 class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
00008 
00009         protected function _initDb(){
00010                 
00011                 $this->db=$this->getPluginResource('db')->getDbAdapter();
00012                 Zend_Db_Table::setDefaultAdapter($this->db);
00013                 
00014                 return $this->db;
00015                 
00016         }
00017                         
00018         protected function _initFront(){
00019                 
00020                 $this->bootstrap('FrontController');
00021                 $this->front=$this->getResource('FrontController');
00022                 return $this->front;
00023                 
00024         }    
00025         
00026         protected function _initRequest(){
00027                 
00028                 $this->request = new Zend_Controller_Request_Http();
00029                 $this->front->setRequest($this->request);
00030            
00031                 return $this->request;
00032                 
00033         }
00034         
00035         protected function _initRoutes(){
00036                 
00037                 $this->router = $this->front->getRouter(); 
00038                 
00039                 return $this->router;
00040                 
00041         }
00042    
00043         
00044         
00045 }