src/RawPHP/RawRouter/Controller.php
public function run()
    {
        $event = new BeforeControllerRunEvent();

        $this->dispatcher->fire( Events::EVENT_BEFORE_CONTROLLER_RUN, $event );

        $action = $this->action->getName();

        if ( $this->action->hasParams() )
        {
            call_user_func_array( [
                                      $this,
                                      $action
                                  ],
                                  $this->action->getParams()
            );
        }
        else
        {
            $this->$action();
        }

        $event = new AfterControllerRunEvent();

        $this->dispatcher->fire( Events::EVENT_AFTER_CONTROLLER_RUN, $event );
    }
public function run()
    {
        $event = new BeforeControllerRunEvent();

        $this->dispatcher->fire( Events::EVENT_BEFORE_CONTROLLER_RUN, $event );

        $action = $this->action->getName();

        if ( $this->action->hasParams() )
        {
            call_user_func_array( [
                                      $this,
                                      $action
                                  ],
                                  $this->action->getParams()
            );
        }
        else
        {
            $this->$action();
        }

        $event = new AfterControllerRunEvent();

        $this->dispatcher->fire( Events::EVENT_AFTER_CONTROLLER_RUN, $event );
    }
public function run ( ) { $ event = new BeforeControllerRunEvent ( ) ; $ this -> dispatcher -> fire ( Events :: EVENT_BEFORE_CONTROLLER_RUN , $ event ) ; $ action = $ this -> action -> getName ( ) ; if ( $ this -> action -> hasParams ( ) ) { call_user_func_array ( [ $ this , $ action ] , $ this -> action -> getParams ( ) ) ; } else { $ this -> $ action ( ) ; } $ event = new AfterControllerRunEvent ( ) ; $ this -> dispatcher -> fire ( Events :: EVENT_AFTER_CONTROLLER_RUN , $ event ) ; }
Runs the controller action.
Runs the controller action .