public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
public function addAction ( $ action ) { if ( $ action instanceof Action ) { $ action = $ action -> getName ( ) ; } $ this -> actionList [ ] = $ action ; $ this -> valid = null ; return $ this ; }
Adds a action name to the list of actions the worker listens to.

@param Action $action

@return Worker
Adds a action name to the list of actions the worker listens to .