/** * Constructor. * * @param string $environment The environment name * @param Boolean $debug true to enable debug mode * @param string $rootDir The project root directory * @param sfEventDispatcher $dispatcher An event dispatcher */ public function __construct($environment, $debug, $rootDir = null, sfEventDispatcher $dispatcher = null) { $this->environment = $environment; $this->debug = (boolean) $debug; $this->application = str_replace('Configuration', '', get_class($this)); parent::__construct($rootDir, $dispatcher); $this->configure(); $this->initConfiguration(); if (sfConfig::get('sf_check_lock')) { $this->checkLock(); } if (file_exists($file = sfConfig::get('sf_app_cache_dir').'/config/configuration.php')) { $this->cache = require $file; } $this->initialize(); // store current sfConfig values $this->config = sfConfig::getAll(); }
/** * Constructor. * * @param string $environment The environment name * @param Boolean $debug true to enable debug mode * @param string $rootDir The project root directory * @param sfEventDispatcher $dispatcher An event dispatcher */ public function __construct($environment, $debug, $rootDir = null, sfEventDispatcher $dispatcher = null) { $this->environment = $environment; $this->debug = (bool) $debug; $this->application = str_replace('Configuration', '', get_class($this)); parent::__construct($rootDir, $dispatcher); $this->configure(); $this->initConfiguration(); if (sfConfig::get('sf_check_lock')) { $this->checkLock(); } if (sfConfig::get('sf_check_symfony_version')) { $this->checkSymfonyVersion(); } $this->initialize(); // store current sfConfig values $this->config = sfConfig::getAll(); }