Nette\Configurator::addConfig PHP Method

addConfig() public method

Adds configuration file.
public addConfig ( $file ) : self
return self
    public function addConfig($file)
    {
        $section = func_num_args() > 1 ? func_get_arg(1) : NULL;
        if ($section !== NULL) {
            trigger_error('Sections in config file are deprecated.', E_USER_DEPRECATED);
        }
        $this->files[] = [$file, $section === self::AUTO ? $this->parameters['debugMode'] ? 'development' : 'production' : $section];
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: ShoPHP.php プロジェクト: shophp/shophp
 public static function initialize(Configurator $configurator)
 {
     $configurator->addConfig(__DIR__ . '/config/base.neon');
     $configurator->addConfig(__DIR__ . '/config/routes.neon');
     $configurator->addConfig(__DIR__ . '/config/services.neon');
     $configurator->addConfig(__DIR__ . '/config/presenters.neon');
 }
All Usage Examples Of Nette\Configurator::addConfig