console\Application getRequest()

getRequest() public method Returns the request component. public yii\console\Request getRequest ( )return yii\console\Request The request component.

console\Application coreComponents()

coreComponents() public method Returns the configuration of core application components. public void coreComponents ( )

console\Application getErrorHandler()

getErrorHandler() public method Returns the error handler component. public yii\console\ErrorHandler getErrorHandler ( )return yii\console\ErrorHandler The error handler application component.

console\Application coreCommands()

coreCommands() public method Returns the configuration of the built-in commands. public array coreCommands ( )return array The configuration of the built-in commands.

console\Application $response

$response public read-only property The response component. public yii\console\Response getResponse ( )

console\Application $enableCoreCommands

$enableCoreCommands public property Whether to enable the commands provided by the core framework. Defaults to true. public boolean $enableCoreCommands = true

console\Application $errorHandler

$errorHandler public read-only property The error handler application component. public yii\console\ErrorHandler getErrorHandler ( )

console\Application $request

$request public read-only property The request component. public yii\console\Request getRequest ( )

console\Application $defaultRoute

$defaultRoute public property The default route of this application. Defaults to 'help', meaning the help command. public string $defaultRoute = 'help'

Console applications

Usage The entry script Configuration Creating your own console commands Besides the rich features for building web applications, Yii also has full-featured support for console applications which are mainly used to create background and maintenance tasks that need to be performed for a website. The structure of console applications is very similar to a Yii web application. It consists of one or more yii\console\Controller classes, which are often referred to as commands in the console environme