How to get action name ‘Show’ in CConsoleCommand?If I need to get the action name from FUNCTION or init a public varible in beforeAction()?
<?php
class TestCommand extends CConsoleCommand{
public $action;
protected function beforeAction($action, $params) {
$this->action = $action;
return parent::beforeAction($action, $params);
}
public function actionShow(){
var_dump($this->action,___FUNCTION__);
}
}