Changeset 7696
- Timestamp:
- 02/29/08 21:36:29 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/sfApplicationConfiguration.class.php
r7694 r7696 34 34 public function __construct($environment, $debug, $rootDir = null) 35 35 { 36 $this->initialize($environment, $debug);37 38 parent::__construct($rootDir);39 40 $this->configure();41 42 if (sfConfig::get('sf_check_lock'))43 {44 $this->checkLock();45 }46 47 if (sfConfig::get('sf_check_symfony_version'))48 {49 $this->checkSymfonyVersion();50 }51 }52 53 /**54 * Initializes the current configuration.55 *56 * @param string The environment name57 * @param Boolean true to enable debug mode58 */59 public function initialize($environment, $debug)60 {61 36 $this->environment = $environment; 62 37 $this->debug = (boolean) $debug; 63 38 $this->application = str_replace('Configuration', '', get_class($this)); 39 40 parent::__construct($rootDir); 41 42 $this->configure(); 43 44 $this->initConfiguration(); 45 46 if (sfConfig::get('sf_check_lock')) 47 { 48 $this->checkLock(); 49 } 50 51 if (sfConfig::get('sf_check_symfony_version')) 52 { 53 $this->checkSymfonyVersion(); 54 } 55 56 $this->initialize(); 64 57 } 65 58 … … 70 63 */ 71 64 public function configure() 65 { 66 } 67 68 /** 69 * Initialized the current configuration. 70 * 71 * Override this method if you want to customize your application initialization. 72 */ 73 public function initialize() 72 74 { 73 75 } … … 95 97 public function initConfiguration() 96 98 { 97 parent::initConfiguration();98 99 99 // in debug mode, start global timer 100 100 if ($this->isDebug()) branches/1.1/lib/config/sfProjectConfiguration.class.php
r7691 r7696 52 52 $this->dispatcher = new sfEventDispatcher(); 53 53 54 $this->initConfiguration();55 56 $this->setup();57 }58 59 /**60 * Setups the current configuration.61 *62 * Override this method if you want to customize your project configuration.63 */64 public function setup()65 {66 }67 68 public function initConfiguration()69 {70 54 ini_set('magic_quotes_runtime', 'off'); 71 55 ini_set('register_globals', 'off'); … … 74 58 75 59 $this->setRootDir($this->rootDir); 60 61 $this->setup(); 62 } 63 64 /** 65 * Setups the current configuration. 66 * 67 * Override this method if you want to customize your project configuration. 68 */ 69 public function setup() 70 { 76 71 } 77 72