framework/console/CConsoleCommand.php
protected function beforeAction($action,$params)
	{
		if($this->hasEventHandler('onBeforeAction'))
		{
			$event = new CConsoleCommandEvent($this,$params,$action);
			$this->onBeforeAction($event);
			return !$event->stopCommand;
		}
		else
		{
			return true;
		}
	}
protected function beforeAction($action,$params)
	{
		if($this->hasEventHandler('onBeforeAction'))
		{
			$event = new CConsoleCommandEvent($this,$params,$action);
			$this->onBeforeAction($event);
			return !$event->stopCommand;
		}
		else
		{
			return true;
		}
	}
protected function beforeAction ( $ action , $ params ) { if ( $ this -> hasEventHandler ( 'onBeforeAction' ) ) { $ event = new CConsoleCommandEvent ( $ this , $ params , $ action ) ; $ this -> onBeforeAction ( $ event ) ; return ! $ event -> stopCommand ; } else { return true ; } }
This method is invoked right before an action is to be executed.
You may override this method to do last-minute preparation for the action.
@param string $action the action name
@param array $params the parameters to be passed to the action method.
@return boolean whether the action should be executed.
This method is invoked right before an action is to be executed . You may override this method to do last - minute preparation for the action .