__construct()
dispatch()
getDependencies()
getRequest()
getResponse()
renderDebugOutput()
renderView()
route()
run()
setRequest()
setRequestPaths()
setResponse()
setSendResponse()
setup()
showDebugOutput()
_getErrorResponseFromException()
_getValidatedController()
_getViewRenderer()
_handleControllerResponse()
_rerouteNotFound()
_rerouteServerError()
$_dependencies
$_request
$_response
$_sendResponse
Class to manage most of the flow of a request to a XenForo page.
This class: resolves a URL to a route, loads a specified controller, executes an action in that controller, loads the view, renders the view, and outputs the response.
Most dependent objects can be injected
package | XenForo_Mvc |
---|
__construct(\XenForo_Dependencies_Abstract $dependencies)
Sets up dependencies.
XenForo_Dependencies_Abstract
dispatch(\XenForo_RouteMatch $routeMatch) : \XenForo_ControllerResponse_Abstract | null
\XenForo_RouteMatch
\XenForo_ControllerResponse_Abstract
null
Null will only occur if error handling is brokengetRequest() : \Zend_Controller_Request_Http
\Zend_Controller_Request_Http
getResponse() : \Zend_Controller_Response_Http
\Zend_Controller_Response_Http
renderDebugOutput(string $originalContent) : string
Alternatively, it could inject itself into the view content.
string
Original, rendered view content
string
Replacement rendered view contentrenderView(\XenForo_ControllerResponse_Abstract $controllerResponse, \XenForo_ViewRenderer_Abstract $viewRenderer, array $containerParams) : string
\XenForo_ControllerResponse_Abstract
Controller response object from last controller
array
Extra container params (probably "sections" from routing)
string
View outputrun() : string | null
Primary method to be used by the external API.
string
null
Returns a string if {@link $_sendResponse} is falsesetRequest(\Zend_Controller_Request_Http $request)
Zend_Controller_Request_Http
setRequestPaths()
setResponse(\Zend_Controller_Response_Http $response)
Zend_Controller_Response_Http
setSendResponse($sendResponse)
boolean
setup()
showDebugOutput() : boolean
This usually depends on application configuration and a request param.
boolean
_getErrorResponseFromException(\Exception $e) : \XenForo_ControllerResponse_Abstract
_getValidatedController(string $controllerName, string $action, \XenForo_RouteMatch $routeMatch) : \XenForo_Controller | null
string
Name of the controller to load
string
Name of the action to run
_getViewRenderer(string $responseType) : \XenForo_ViewRenderer_Abstract
string
Response type (eg, html, xml, json)
_handleControllerResponse(mixed $controllerResponse, string $controllerName, string $action) : false | array
mixed
Exceptions will be thrown if is not {@link XenForo_ControllerResponse_Abstract}
string
Name of the controller that generated this response
string
Name of the action that generated this response
false
array
False if no reroute is needed. Array with keys controllerName and action if needed._rerouteNotFound(string $controllerName, string $action) : array
string
Controller name
string
Action
array
Reroute array_rerouteServerError(\Exception $e) : array
$_dependencies : \XenForo_Dependencies_Abstract
$_request : \Zend_Controller_Request_Http
see | \global\setRequest() |
---|
$_response : \Zend_Controller_Response_Http
see | \global\setResponse() |
---|
$_sendResponse : boolean
If set to false, the response is returned instead.
see | \global\setSendResponse() |
---|