PHP Class Ergo\Routing\RoutedController

Inheritance: implements Ergo\Routing\Controller
Show file Open project: 99designs/ergo

Public Methods

Method Description
__construct ( $router = null )
addRequestFilter ( Ergo\Routing\RequestFilter $filter ) Adds an {@link RequestFilter} to the controller
configure ( $script ) Executes a php script in the context of the controller for configuration
connect ( $url, $name, $controller = null ) Defines a url, a route name and an optional controller
execute ( $request ) * (non-phpdoc)
setControllerResolver ( Ergo\Routing\ControllerResolver $factory ) Sets an optional controller factory to use to build controllers

Private Methods

Method Description
_controllerFor ( $name ) Gets a controller for a path, either from a locally registered controller or one from a controller factory

Method Details

__construct() public method

public __construct ( $router = null )

addRequestFilter() public method

Adds an {@link RequestFilter} to the controller
public addRequestFilter ( Ergo\Routing\RequestFilter $filter )
$filter Ergo\Routing\RequestFilter

configure() public method

Executes a php script in the context of the controller for configuration
public configure ( $script )

connect() public method

Defines a url, a route name and an optional controller
public connect ( $url, $name, $controller = null )
$url string the url to connect the route to
$name string an arbitrary controller name, must be unique
$controller mixed either a controller class, or the name of another route

execute() public method

* (non-phpdoc)
See also: Controller::execute
public execute ( $request )

setControllerResolver() public method

Sets an optional controller factory to use to build controllers
public setControllerResolver ( Ergo\Routing\ControllerResolver $factory )
$factory Ergo\Routing\ControllerResolver