src/Traits/ComplementAction.php
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
public function doAction ( $ action ) { $ controller = $ this -> getOption ( 'hooks-controller' ) ; $ instance = $ this -> getControllerInstance ( $ controller ) ; if ( is_object ( $ instance ) && method_exists ( $ instance , $ action ) ) { $ response = call_user_func ( [ $ instance , $ action ] ) ; } $ this -> setAction ( '' ) ; return isset ( $ response ) ; }
Execute action hook.

@param string $action → action hook to execute

@uses \Eliasis\Complement\Traits\ComplementAction::setAction()
@uses \Eliasis\Complement\Traits\ComplementHandler::getOption()

@return bool
Execute action hook .