/** * 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; }
/** * Sets the configuration for Propel and all dependencies. * * @param array $c the Configuration * @return void */ public static function setConfiguration($c) { self::$configuration = $c; }
/** * 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; }