| Inheritance | yii\console\UnknownCommandException » yii\console\Exception » yii\base\UserException » yii\base\Exception » Exception |
|---|---|
| Available since version | 2.0.11 |
| Source Code | https://github.com/yiisoft/yii2/blob/master/framework/console/UnknownCommandException.php |
UnknownCommandException represents an exception caused by incorrect usage of a console command.
| Property | Type | Description | Defined By |
|---|---|---|---|
| $command | string | The name of the command that could not be recognized. | yii\console\UnknownCommandException |
| Property | Type | Description | Defined By |
|---|---|---|---|
| $application | yii\console\Application | yii\console\UnknownCommandException |
| Method | Description | Defined By |
|---|---|---|
| __construct() | Construct the exception. | yii\console\UnknownCommandException |
| getName() | yii\console\UnknownCommandException | |
| getSuggestedAlternatives() | Suggest alternative commands for $command based on string similarity. | yii\console\UnknownCommandException |
protected yii\console\Application $application = null
The name of the command that could not be recognized.
public string $command = null
Construct the exception.
| public void __construct ( $route, $application, $code = 0, Exception $previous = null ) | ||
|---|---|---|
| $route | string |
The route of the command that could not be found. |
| $application | yii\console\Application |
The console application instance involved. |
| $code | integer |
The Exception code. |
| $previous | Exception |
The previous exception used for the exception chaining. |
| public string getName ( ) | ||
|---|---|---|
| return | string |
The user-friendly name of this exception |
Suggest alternative commands for $command based on string similarity.
Alternatives are searched using the following steps:
$command
See also http://php.net/manual/en/function.levenshtein.php.
| public array getSuggestedAlternatives ( ) | ||
|---|---|---|
| return | array |
A list of suggested alternatives sorted by similarity. |
© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc-2.0/yii-console-unknowncommandexception.html