src/Control/RequestHandler.php
protected function handleAction($request, $action)
    {
        $classMessage = Director::isLive() ? 'on this handler' : 'on class ' . static::class;

        if (!$this->hasMethod($action)) {
            return new HTTPResponse("Action '$action' isn't available $classMessage.", 404);
        }

        $res = $this->extend('beforeCallActionHandler', $request, $action);
        if ($res) {
            return reset($res);
        }

        $actionRes = $this->$action($request);

        $res = $this->extend('afterCallActionHandler', $request, $action, $actionRes);
        if ($res) {
            return reset($res);
        }

        return $actionRes;
    }
protected function handleAction($request, $action)
    {
        $classMessage = Director::isLive() ? 'on this handler' : 'on class ' . static::class;

        if (!$this->hasMethod($action)) {
            return new HTTPResponse("Action '$action' isn't available $classMessage.", 404);
        }

        $res = $this->extend('beforeCallActionHandler', $request, $action);
        if ($res) {
            return reset($res);
        }

        $actionRes = $this->$action($request);

        $res = $this->extend('afterCallActionHandler', $request, $action, $actionRes);
        if ($res) {
            return reset($res);
        }

        return $actionRes;
    }
protected function handleAction ( $ request , $ action ) { $ classMessage = Director :: isLive ( ) ? 'on this handler' : 'on class ' . static :: class ; if ( ! $ this -> hasMethod ( $ action ) ) { return new HTTPResponse ( "Action '$action' isn't available $classMessage." , 404 ) ; } $ res = $ this -> extend ( 'beforeCallActionHandler' , $ request , $ action ) ; if ( $ res ) { return reset ( $ res ) ; } $ actionRes = $ this -> $ action ( $ request ) ; $ res = $ this -> extend ( 'afterCallActionHandler' , $ request , $ action , $ actionRes ) ; if ( $ res ) { return reset ( $ res ) ; } return $ actionRes ; }
Given a request, and an action name, call that action name on this RequestHandler

Must not raise HTTPResponse_Exceptions - instead it should return

@param $request
@param $action
@return HTTPResponse
Given a request and an action name call that action name on this RequestHandler