| 1 | <?php |
||
| 18 | abstract class Controller extends \yii\console\Controller |
||
| 19 | { |
||
| 20 | use GettersTrait; |
||
| 21 | |||
| 22 | public $layout = false; |
||
| 23 | |||
| 24 | protected $_before = []; |
||
| 25 | protected $_after = []; |
||
| 26 | |||
| 27 | 1 | public function behaviors() |
|
| 33 | |||
| 34 | 1 | public function setBefore($requests) |
|
| 38 | |||
| 39 | 1 | public function getBefore() |
|
| 43 | |||
| 44 | public function setAfter($requests) |
||
| 48 | |||
| 49 | public function getAfter() |
||
| 53 | |||
| 54 | public function readline($prompt) |
||
| 58 | |||
| 59 | public function readpassword($prompt) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Runs list of actions. |
||
| 72 | * @param null|string|array $actions |
||
| 73 | * @return int|Response exit code |
||
| 74 | */ |
||
| 75 | public function runActions($actions) |
||
| 88 | |||
| 89 | /** |
||
| 90 | * Is response Ok. |
||
| 91 | * @param Response|int $response |
||
| 92 | * @return bool |
||
| 93 | */ |
||
| 94 | public static function isResponseOk($response) |
||
| 98 | } |
||
| 99 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: