Core/Engine/Engine.php
public function _action(&$class) {
        ob_start();

        $annotation = Annotation::getClass($class);

        $this->_callAnnotation($class, $annotation, 'class', 'Before');

        if (method_exists($class, 'action' . ucfirst($this->request->action))) {
            $this->_callAnnotation($class, $annotation, 'methods', 'Before');
            $action = 'action' . ucfirst($this->request->action);
            $params = Injector::instance()->getArgsMethod($class, $action);

            $reflectionMethod = new \ReflectionMethod($class, $action);
            $output = $reflectionMethod->invokeArgs($class, $params);
            $this->_callAnnotation($class, $annotation, 'methods', 'After');

            $this->addError('Action "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '" called successfully', __FILE__, __LINE__, ERROR_INFORMATION);
        }
        else {
            throw new Exception('The requested "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '"  doesn\'t exist');
        }

        $this->_callAnnotation($class, $annotation, 'class', 'After');
        $output = ob_get_contents() . $output;
        ob_get_clean();

        return $output;
    }
public function _action(&$class) {
        ob_start();

        $annotation = Annotation::getClass($class);

        $this->_callAnnotation($class, $annotation, 'class', 'Before');

        if (method_exists($class, 'action' . ucfirst($this->request->action))) {
            $this->_callAnnotation($class, $annotation, 'methods', 'Before');
            $action = 'action' . ucfirst($this->request->action);
            $params = Injector::instance()->getArgsMethod($class, $action);

            $reflectionMethod = new \ReflectionMethod($class, $action);
            $output = $reflectionMethod->invokeArgs($class, $params);
            $this->_callAnnotation($class, $annotation, 'methods', 'After');

            $this->addError('Action "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '" called successfully', __FILE__, __LINE__, ERROR_INFORMATION);
        }
        else {
            throw new Exception('The requested "' . $this->request->src . '/' . ucfirst($this->request->controller) . '/action' . ucfirst($this->request->action) . '"  doesn\'t exist');
        }

        $this->_callAnnotation($class, $annotation, 'class', 'After');
        $output = ob_get_contents() . $output;
        ob_get_clean();

        return $output;
    }
public function _action ( & $ class ) { ob_start ( ) ; $ annotation = Annotation :: getClass ( $ class ) ; $ this -> _callAnnotation ( $ class , $ annotation , 'class' , 'Before' ) ; if ( method_exists ( $ class , 'action' . ucfirst ( $ this -> request -> action ) ) ) { $ this -> _callAnnotation ( $ class , $ annotation , 'methods' , 'Before' ) ; $ action = 'action' . ucfirst ( $ this -> request -> action ) ; $ params = Injector :: instance ( ) -> getArgsMethod ( $ class , $ action ) ; $ reflectionMethod = new \ ReflectionMethod ( $ class , $ action ) ; $ output = $ reflectionMethod -> invokeArgs ( $ class , $ params ) ; $ this -> _callAnnotation ( $ class , $ annotation , 'methods' , 'After' ) ; $ this -> addError ( 'Action "' . $ this -> request -> src . '/' . ucfirst ( $ this -> request -> controller ) . '/action' . ucfirst ( $ this -> request -> action ) . '" called successfully' , __FILE__ , __LINE__ , ERROR_INFORMATION ) ; } else { throw new Exception ( 'The requested "' . $ this -> request -> src . '/' . ucfirst ( $ this -> request -> controller ) . '/action' . ucfirst ( $ this -> request -> action ) . '"  doesn\'t exist' ) ; } $ this -> _callAnnotation ( $ class , $ annotation , 'class' , 'After' ) ; $ output = ob_get_contents ( ) . $ output ; ob_get_clean ( ) ; return $ output ; }
call action from controller
@param &$class Controller
@throws Exception
@access public
@return string
@since 3.0
@package Gcs\Framework\Core\Engine
call action from controller