summaryrefslogblamecommitdiffstats
path: root/application/Bootstrap.php
blob: fe469ce244561c5eba123a9a691963c09c23bcb9 (plain) (tree)
1
2
3
4



                                                            












                                                                        
                                 


             





                                                                                



                                                                         



                                           
                
     

                                   
        
                                   
       

                                               
                           

                                                                                      
                                                                    

                                    
     








                                                                    
 
                        
<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initAutoloader()
    {
        $moduleLoader = new Zend_Application_Module_Autoloader
		(
            array
            (
                'namespace' => '',
                'basePath' => APPLICATION_PATH,
                'resourceTypes' => array(
					'form' => array(
						'path'      => 'forms/',
						'namespace' => 'Form',
					)
				)
            )
        );
    }
    protected function _initAutoloaders()
	{
		$this->getApplication()->setAutoloaderNamespaces(array('Pbs_'));
		return $this;
	}

	protected function _initAuth(){
		$auth = Zend_Auth::getInstance();
		$auth->setStorage(new Zend_Auth_Storage_Session('auth'));
	}
	protected function _initDocType(){
        $this->bootstrap('View');
        $view = $this->getResource('View');
        $view->doctype('XHTML1_STRICT');
		
    }
	function _initViewHelpers()
    {
   	
        $this->bootstrap('layout');
       
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        # print_a($layout);
        $view->doctype('XHTML1_STRICT');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
        $view->headLink()->appendStylesheet('/media/css/style.css');
        $view->headTitle('pbs²')
             ->setSeparator(' :: ');
    }
    protected function _initPlugins()
	{
		 $this->bootstrap('autoloaders');
		$this->bootstrap('frontController');
		$plugin = new Pbs_Controller_Plugin_Modularlayout();
		$this->frontController->registerPlugin($plugin);
		
	}

}
include 'Functions.php';