Store a configuration type at the start of the configuration stack. Any
options provided by the new configuration can/will be overridden by
configurations already present.
public unshiftConfigurationType ( Components_Config $type ) : null | ||
$type | Components_Config | The configuration type. |
Результат | null |
public function testPushConfig() { $configs = new Components_Configs(); $configs->addConfigurationType($this->_getAConfig()); $configs->unshiftConfigurationType($this->_getBConfig()); $config = $configs->getOptions(); $this->assertEquals('A', $config['a']); }
private static function _prepareConfig(Horde_Argv_Parser $parser) { $config = new Components_Configs(); $config->addConfigurationType(new Components_Config_Cli($parser)); $config->unshiftConfigurationType(new Components_Config_File($config->getOption('config'))); return $config; }