CraftCli\Application::getEnvironmentOption PHP Метод

getEnvironmentOption() защищенный Метод

Get the environment from the --environment option or from the CRAFT_ENVIRONMENT env variable
protected getEnvironmentOption ( ) : string | null
Результат string | null
    protected function getEnvironmentOption()
    {
        $definition = new InputDefinition();
        $definition->addOption(new InputOption('environment', null, InputOption::VALUE_REQUIRED));
        $input = new Console\GlobalArgvInput(null, $definition);
        return $input->getOption('environment') ?: getenv('CRAFT_ENVIRONMENT');
    }