MvcTools: ezcMvcConfigurableDispatcher
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMvcConfigurableDispatcher
|
This class implements an example dispatcher that can be configured through ezcMvcDispatcherConfiguration. [
source]
Implemented Interfaces
Member Variables
Method Summary
|
public ezcMvcConfigurableDispatcher |
__construct(
$configuration )
Creates a new ezcMvcConfigurableDispatcher |
|
protected void |
checkRedirectLimit(
&$redirects, $redirects )
Checks whether the number of redirects does not exceed the limit, and increases the $redirects count. |
|
protected ezcMvcController |
createController(
$routingInformation, $request )
Creates the controller by using the routing information and request data. |
|
protected ezcMvcController |
getController(
$routingInformation, $request )
Uses the router (through createController()) to fetch the controller |
|
protected ezcMvcRequest |
getFatalRedirectRequest(
$request, $result, $e )
Uses the configuration to fetch a fatal redirect request object |
|
protected ezcMvcRequestParser |
getRequestParser(
)
Uses the configuration to fetch the request parser |
|
protected ezcMvcResponseWriter |
getResponseWriter(
$routingInformation, $request, $result, $response )
Uses the configuration to fetch the response writer |
|
protected ezcMvcRouter |
getRouter(
$request )
Uses the configuration to fetch the router |
|
protected ezcMvcView |
getView(
$routingInformation, $request, $result )
Uses the configuration to fetch the view handler |
|
public void |
run(
)
Runs through the request, by using the configuration to obtain correct handlers. |
Methods
__construct
Creates a new ezcMvcConfigurableDispatcher
Parameters
checkRedirectLimit
void checkRedirectLimit(
&$redirects, int
$redirects )
Checks whether the number of redirects does not exceed the limit, and increases the $redirects count.
Parameters
| Name |
Type |
Description |
$redirects |
int |
|
&$redirects |
|
|
Throws
| Class | Description |
ezcMvcInfiniteLoopException |
when the number of redirects exceeds the limit (25 by default). |
createController
Creates the controller by using the routing information and request data.
Parameters
getController
Uses the router (through createController()) to fetch the controller
Parameters
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
getFatalRedirectRequest
Uses the configuration to fetch a fatal redirect request object
Parameters
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
getRequestParser
Uses the configuration to fetch the request parser
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
getResponseWriter
Uses the configuration to fetch the response writer
Parameters
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
getRouter
Uses the configuration to fetch the router
Parameters
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
getView
Uses the configuration to fetch the view handler
Parameters
Throws
| Class | Description |
ezcMvcInvalidConfiguration |
when the returned object is of the wrong class |
run
void run(
)
Runs through the request, by using the configuration to obtain correct handlers.
Last updated: Tue, 01 Sep 2009