bootstrap('view'); $view = $this->getResource('view'); $view->setEncoding('UTF-8'); $view->doctype('XHTML1_STRICT'); $view->headMeta() ->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ->appendHttpEquiv('Content-Language', 'fr-FR'); $view->headLink() ->appendStylesheet('/styles/main.css', 'all'); $view->headTitle('WsEntreprise'); } //Initialisation global des paramètres de log protected function _initLogging() { require_once 'Zend/Log.php'; require_once 'Zend/Mail.php'; $pathLog = ''; if (in_array(APPLICATION_ENV, array('production','staging')) ) { $pathLog = '/var/log/webservice'; if ( !is_dir($logPath) ){ mkdir($pathLog); } $pathLog.= '/'; } $WsLogger = new Zend_Log(); $WsFileWriter = new Zend_Log_Writer_Stream($pathLog . 'wsentreprise.log'); $WsFileWriter->addFilter(Zend_Log::INFO); $WsLogger->addWriter($WsFileWriter); if (APPLICATION_ENV == 'production') { $WsMail = new Zend_Mail(); $WsMail->setFrom('production@scores-decisions.com') ->addTo('mricois@scores-decisions.com'); $WsMailWriter = new Zend_Log_Writer_Mail($WsMail); $WsMailWriter->setSubjectPrependText('ERREUR'); $WsMailWriter->addFilter(Zend_Log::ERR); $WsLogger->addWriter($WsMailWriter); } $AppFileWriter = new Zend_Log_Writer_Stream($pathLog . 'application.log'); $AppFileWriter->addFilter(Zend_Log::ERR); $AppLogger = new Zend_Log(); $AppLogger->addWriter($AppFileWriter); Zend_Registry::set('WsLogger', $WsLogger); Zend_Registry::set('log', $AppLogger); } protected function _initDb(){} }