bootstrap('view'); $view = $this->getResource('view'); /* * Si on détecte un périphérique mobile alors on charge * les bons scripts $theme = 'mobile'; $path = realpath(APPLICATION_PATH.'/views/'.$theme); $view = new Zend_View(); $view->addBasePath($path); */ $theme = 'default'; $pathStyle = '/themes/'.$theme.'/styles'; $pathScript = '/themes/'.$theme.'/scripts'; $view->setEncoding('UTF-8'); $view->doctype('XHTML1_STRICT'); $view->headMeta() ->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ->appendHttpEquiv('Content-Language', 'fr-FR'); //Get controller name + action name to define css and js to load $view->headLink() ->appendStylesheet($pathStyle.'/reset.css', 'all') ->appendStylesheet($pathStyle.'/main.css', 'all') ->appendStylesheet($pathStyle.'/menu.css', 'all') ->appendStylesheet($pathStyle.'/jquery-ui.css', 'all'); $view->headScript() ->appendFile($pathScript.'/jquery.js', 'text/javascript') ->appendFile($pathScript.'/jquery.bgiframe.js', 'text/javascript') ->appendFile($pathScript.'/jquery-ui.js', 'text/javascript') ->appendFile($pathScript.'/script.js', 'text/javascript'); $view->headTitle()->setSeparator(' - '); $view->headTitle('Extranet Scores & Décisions'); } protected function _initRouter() { $this->bootstrap('frontController'); $front = $this->getResource('frontController'); $router = $front->getRouter(); $route = new Zend_Controller_Router_Route('localauth/', array( 'controller' => 'user', 'action' => 'login' )); $router->addRoute('localauth', $route); return $router; } protected function _initNavigation() { /* $view = $this->bootstrap('layout')->getResource('layout')->getView(); require_once 'Scores/Menu.php'; $computeMenu = new Menu(); $menu = $computeMenu->getMenu(); $view->navigation($menu); */ } protected function _initLogging(){ $writer = new Zend_Log_Writer_Firebug(); if(APPLICATION_ENV=='production') $writer->setEnabled(false); $logger = new Zend_Log($writer); Zend_Registry::set('firebug', $logger); } //protected function _initDb(){} }