本文整理匯總了PHP中Propel::configuration方法的典型用法代碼示例。如果您正苦於以下問題:PHP Propel::configuration方法的具體用法?PHP Propel::configuration怎麽用?PHP Propel::configuration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Propel
的用法示例。
在下文中一共展示了Propel::configuration方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setConfiguration
/**
* Sets the configuration for Propel and all dependencies.
*
* @param mixed The Configuration (array or PropelConfiguration)
*/
public static function setConfiguration($c)
{
if (is_array($c)) {
if (isset($c['propel']) && is_array($c['propel'])) {
$c = $c['propel'];
}
$c = new PropelConfiguration($c);
}
self::$configuration = $c;
}
示例2: setConfiguration
/**
* Sets the configuration for Propel and all dependencies.
*
* @param array $c the Configuration
* @return void
*/
public static function setConfiguration($c)
{
self::$configuration = $c;
}
示例3: setConfiguration
/**
* Sets the configuration for Propel and all dependencies.
*
* @param mixed The Configuration (array or PropelConfiguration)
*/
public static function setConfiguration($c)
{
if (is_array($c)) {
/* For some reason the array generated from runtime-conf.xml has separate
* 'log' section and 'propel' sections. To maintain backward compatibility
* we need to remove 'propel' section BUT of course first save the 'log' section.
*
* So here goes...
*/
$log = array();
if (isset($c['propel']) && isset($c['log'])) {
//looks like the original array from myproject-conf.php
$log = $c['log'];
}
// Support having the configuration stored within a 'propel' sub-section or at the top-level
if (isset($c['propel']) && is_array($c['propel'])) {
$c = $c['propel'];
}
if ($log) {
$c['log'] = $log;
}
$c = new PropelConfiguration($c);
}
self::$configuration = $c;
}