Use modules
This commit is contained in:
parent
dd6d0d4de0
commit
8a7b5aef09
@ -1,14 +1,34 @@
|
||||
<?php
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
protected function _initConfig()
|
||||
/**
|
||||
* Set config available in all apps
|
||||
*/
|
||||
protected function _initConfig()
|
||||
{
|
||||
$config = new Zend_Config($this->getOptions());
|
||||
Zend_Registry::set('config', $config);
|
||||
return $config;
|
||||
}
|
||||
|
||||
//Initialisation global des paramètres de vue
|
||||
/**
|
||||
* Init controller with modules
|
||||
*/
|
||||
protected function _initController()
|
||||
{
|
||||
$this->bootstrap('frontController');
|
||||
$front = $this->getResource('frontController');
|
||||
$front->setControllerDirectory(array(
|
||||
'default' => __DIR__ . '/modules/default/controllers',
|
||||
'admin' => __DIR__ . '/modules/admin/controllers',
|
||||
));
|
||||
|
||||
return $front;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisation global des paramètres de vue
|
||||
*/
|
||||
protected function _initViewSettings()
|
||||
{
|
||||
$this->bootstrap('view');
|
||||
@ -18,6 +38,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$view->headTitle('Extranet Scores & Décisions');
|
||||
}
|
||||
|
||||
/**
|
||||
* Some specific route
|
||||
* @return unknown
|
||||
*/
|
||||
protected function _initRouter()
|
||||
{
|
||||
$this->bootstrap('frontController');
|
||||
@ -61,9 +85,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$logger = new Zend_Log($writer);
|
||||
Zend_Registry::set('firebug', $logger);
|
||||
|
||||
//ChromePHP - a voir comment désactiver
|
||||
require_once 'Vendors/ChromePHP/ChromePhp.php';
|
||||
|
||||
//Application Logger en Production
|
||||
$AppLogger = new Zend_Log();
|
||||
if (APPLICATION_ENV == 'production')
|
||||
@ -76,16 +97,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$AppMailWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppMailWriter);
|
||||
}
|
||||
/* Remove as it's not use
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/log';
|
||||
$AppFileWriter = new Zend_Log_Writer_Stream($path.'/application.log');
|
||||
$AppFileWriter->addFilter(Zend_Log::ERR);
|
||||
$AppLogger->addWriter($AppFileWriter);
|
||||
*/
|
||||
Zend_Registry::set('log', $AppLogger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Init database
|
||||
*/
|
||||
protected function _initDb()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
@ -116,13 +133,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Init cache
|
||||
*/
|
||||
protected function _initCache()
|
||||
{
|
||||
//MetadataCache pour la base de données
|
||||
$cache = Zend_Cache::factory(
|
||||
'Core',
|
||||
'Apc',
|
||||
array('lifetime' => 28800,'automatic_serialization' => true),
|
||||
$cache = Zend_Cache::factory('Core', 'Apc',
|
||||
array('lifetime' => 28800, 'automatic_serialization' => true),
|
||||
array()
|
||||
);
|
||||
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user