kahlan\cli\Kahlan::loadConfig PHP Метод

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

Load the config.
public loadConfig ( string $argv = [] )
$argv string The command line string.
    public function loadConfig($argv = [])
    {
        $commandLine = new CommandLine();
        $commandLine->option('config', ['default' => 'kahlan-config.php']);
        $commandLine->option('help', ['type' => 'boolean']);
        $commandLine->option('version', ['type' => 'boolean']);
        $commandLine->parse($argv);
        $run = function ($commandLine) {
            if (file_exists($commandLine->get('config'))) {
                require $commandLine->get('config');
            }
        };
        $run($commandLine);
        $this->_commandLine->parse($argv, false);
        if ($commandLine->get('help')) {
            return $this->_help();
        }
        if ($commandLine->get('version')) {
            return $this->_version();
        }
    }