Interface RouterInterface

Summary

Fully Qualified Name: CodeIgniter\Router\RouterInterface

Description

Expected behavior of a Router.

Methods

Name Description Defined By
__construct() Stores a reference to the RouteCollection object. RouterInterface
controllerName() Returns the name of the matched controller. RouterInterface
handle() Scans the URI and attempts to match the current URI to the one of the defined routes in the RouteCollection. RouterInterface
methodName() Returns the name of the method to run in the chosen container. RouterInterface
params() Returns the binds that have been matched and collected during the parsing process as an array, ready to send to instance->method(. RouterInterface
setIndexPage() Sets the value that should be used to match the index.php file. Defaults to index.php but this allows you to modify it in case your are using something like mod_rewrite to remove the page. This allows you to set it a blank. RouterInterface

Method Details

__construct()

Stores a reference to the RouteCollection object.

Parameter Name Type Description
$routes \RouteCollectionInterface
$request \CodeIgniter\HTTP\Request

Returns:

controllerName()

Returns the name of the matched controller.

Returns: mixed

handle()

Scans the URI and attempts to match the current URI to the one of the defined routes in the RouteCollection.

Parameter Name Type Description
$uri string

Returns: mixed

methodName()

Returns the name of the method to run in the chosen container.

Returns: mixed

params()

Returns the binds that have been matched and collected during the parsing process as an array, ready to send to instance->method(.

..$params).

Returns: mixed

setIndexPage()

Sets the value that should be used to match the index.php file. Defaults to index.php but this allows you to modify it in case your are using something like mod_rewrite to remove the page. This allows you to set it a blank.

Parameter Name Type Description
$page
$page

Returns: mixed

Top