Commit 62f262e4 by Larry Ullman

Edited intro, usage

Not sure about the “for example…” paragraph under “usage”. Doesn’t read well currently.
parent 4fcd5003
Console applications Console applications
==================== ====================
Yii has full featured support of console. Console application structure in Yii is very similar to web application. It Yii has full featured support for console applications, whose structure is very similar to a Yii web application. A console application
consists of one or more [[yii\console\Controller]] (often referred to as commands). Each has one or more actions. consists of one or more [[yii\console\Controller]] classes, which are often referred to as "commands" in the console environment. Each controller can also have one or more actions, just like web controllers.
Usage Usage
----- -----
You can execute controller action using the following syntax: You execute a console controller action using the following syntax:
``` ```
yii <route> [--option1=value1 --option2=value2 ... argument1 argument2 ...] yii <route> [--option1=value1 --option2=value2 ... argument1 argument2 ...]
``` ```
For example, [[yii\console\controllers\MigrateController::actionCreate()|MigrateController::actionCreate()]] For example, the [[yii\console\controllers\MigrateController::actionCreate()|MigrateController::actionCreate()]]
with [[yii\console\controllers\MigrateController::$migrationTable|MigrateController::$migrationTable]] set can with [[yii\console\controllers\MigrateController::$migrationTable|MigrateController::$migrationTable]] set can
be called from command line like the following: be called from command line like so:
``` ```
yii migrate/create --migrationTable=my_migration yii migrate/create --migrationTable=my_migration
``` ```
In the above `yii` is console application entry script described below. In the above `yii` is the console application entry script described below.
Entry script Entry script
------------ ------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment