本文整理匯總了PHP中ProjectConfiguration::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProjectConfiguration::__construct方法的具體用法?PHP ProjectConfiguration::__construct怎麽用?PHP ProjectConfiguration::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ProjectConfiguration
的用法示例。
在下文中一共展示了ProjectConfiguration::__construct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* 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();
}
示例2: __construct
/**
* 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();
}