core/base/Boot.php
public function applicationConsole()
    {
        $this->setIsCli(true);
        $config = $this->getConfigArray();
        $config['defaultRoute'] = 'help';
        if (isset($config['components'])) {
            if (isset($config['components']['composition'])) {
                unset($config['components']['composition']);
            }
        }
        
        $this->includeYii();

        $baseUrl = null;
        if (isset($config['consoleBaseUrl'])) {
            $baseUrl = $config['consoleBaseUrl'];
        } elseif (isset($config['consoleHostInfo'])) {
            $baseUrl = '/';
        }
        
        $mergedConfig = ArrayHelper::merge($config, [
            'bootstrap' => ['luya\console\Bootstrap'],
            'components' => [
                'urlManager' => [
                    'class' => 'yii\web\UrlManager',
                    'enablePrettyUrl' => true,
                    'showScriptName' => false,
                    'baseUrl' => $baseUrl,
                    'hostInfo' => isset($config['consoleHostInfo']) ? $config['consoleHostInfo'] : null,
                ],
            ],
        ]);
        $this->app = new ConsoleApplication($mergedConfig);
        if (!$this->mockOnly) {
            exit($this->app->run());
        }
    }
public function applicationConsole()
    {
        $this->setIsCli(true);
        $config = $this->getConfigArray();
        $config['defaultRoute'] = 'help';
        if (isset($config['components'])) {
            if (isset($config['components']['composition'])) {
                unset($config['components']['composition']);
            }
        }
        
        $this->includeYii();

        $baseUrl = null;
        if (isset($config['consoleBaseUrl'])) {
            $baseUrl = $config['consoleBaseUrl'];
        } elseif (isset($config['consoleHostInfo'])) {
            $baseUrl = '/';
        }
        
        $mergedConfig = ArrayHelper::merge($config, [
            'bootstrap' => ['luya\console\Bootstrap'],
            'components' => [
                'urlManager' => [
                    'class' => 'yii\web\UrlManager',
                    'enablePrettyUrl' => true,
                    'showScriptName' => false,
                    'baseUrl' => $baseUrl,
                    'hostInfo' => isset($config['consoleHostInfo']) ? $config['consoleHostInfo'] : null,
                ],
            ],
        ]);
        $this->app = new ConsoleApplication($mergedConfig);
        if (!$this->mockOnly) {
            exit($this->app->run());
        }
    }
public function applicationConsole ( ) { $ this -> setIsCli ( true ) ; $ config = $ this -> getConfigArray ( ) ; $ config [ 'defaultRoute' ] = 'help' ; if ( isset ( $ config [ 'components' ] ) ) { if ( isset ( $ config [ 'components' ] [ 'composition' ] ) ) { unset ( $ config [ 'components' ] [ 'composition' ] ) ; } } $ this -> includeYii ( ) ; $ baseUrl = null ; if ( isset ( $ config [ 'consoleBaseUrl' ] ) ) { $ baseUrl = $ config [ 'consoleBaseUrl' ] ; } elseif ( isset ( $ config [ 'consoleHostInfo' ] ) ) { $ baseUrl = '/' ; } $ mergedConfig = ArrayHelper :: merge ( $ config , [ 'bootstrap' => [ 'luya\console\Bootstrap' ] , 'components' => [ 'urlManager' => [ 'class' => 'yii\web\UrlManager' , 'enablePrettyUrl' => true , 'showScriptName' => false , 'baseUrl' => $ baseUrl , 'hostInfo' => isset ( $ config [ 'consoleHostInfo' ] ) ? $ config [ 'consoleHostInfo' ] : null , ] , ] , ] ) ; $ this -> app = new ConsoleApplication ( $ mergedConfig ) ; if ( ! $ this -> mockOnly ) { exit ( $ this -> app -> run ( ) ) ; } }
Run Cli-Application based on the provided config file.

@return string|integer
Run Cli - Application based on the provided config file .