/** * Do every extend according to application context, environment and config target type (APPLICATION OR BUNDLE). * * @param integer $type define which kind of extend we want to apply * (self::APPLICATION_CONFIG or self::BUNDLE_CONFIG) * @param Config $config the config we want to extend * @param array $options options for extend config action */ public function extend($type, Config $config, $options = array()) { if (false === $config->isRestored()) { if (self::APPLICATION_CONFIG === $type) { return parent::extend($type, $config, $options); } elseif (self::BUNDLE_CONFIG === $type) { // do nothing } else { throw new InvalidConfigTypeException('extend', $type); } } }
/** * Do every extend according to application context, environment and config target type (APPLICATION OR BUNDLE). * * @param integer $type define which kind of extend we want to apply * (self::APPLICATION_CONFIG or self::BUNDLE_CONFIG) * @param Config $config the config we want to extend * @param array $options options for extend config action */ public function extend($type, Config $config, $options = array()) { if (false === $config->isRestored()) { if (self::APPLICATION_CONFIG === $type) { $this->doApplicationConfigExtend($config); } elseif (self::BUNDLE_CONFIG === $type) { $this->doBundleConfigExtend($config, $options); } else { throw new InvalidConfigTypeException('extend', $type); } } }