Nette\DI\Compiler::addConfig PHP Метод

addConfig() публичный Метод

Adds new configuration.
public addConfig ( array $config ) : self
$config array
Результат self
    public function addConfig(array $config)
    {
        $this->config = Config\Helpers::merge($config, $this->config);
        return $this;
    }

Usage Example

Пример #1
0
 protected function _before()
 {
     $this->compiler = new \Nette\DI\Compiler();
     $this->compiler->addConfig(['parameters' => ['debugMode' => TRUE]]);
     $this->compiler->addExtension('params', new \WebChemistry\Parameters\DI\ParametersExtension());
     $this->compiler->addExtension('http', new \Nette\Bridges\HttpDI\HttpExtension());
     $this->compiler->addExtension('mock', new MockExtension());
 }
All Usage Examples Of Nette\DI\Compiler::addConfig