protected loadConfig ( array $options ) : void | ||
$options | array | 选项 |
Результат | void |
protected function loadConfig($options)
{
if (isset($options['env']) && !in_array($options['env'], ['cli', 'product', 'development'])) {
throw new \InvalidArgumentException('option --env\'s value must be [cli, product, development]');
}
$env = 'development';
isset($options['env']) && ($env = $options['env']);
Output::writeln('using config -- ' . Colour::colour($env, Colour::GREEN));
$this->setConfig(new Config($env));
}