Core_Router_Route
in package
Routes
$oCore_Router_Route = new Core_Router_Route('/news/({path})(page-{page}/)(tag/{tag}/)');
$oCore_Router_Route->setUri('/news/page-17/')
->execute()
->compress()
->sendHeaders()
->showBody();
Tags
Table of Contents
- $_action : string
- Action name
- $_controller : string
- Controller name
- $_controllerColumns : array<string|int, mixed>
- Array of columns will be set for controller object
- $_pregPattern : string
- Preg pattern
- $_uri : string
- URI
- $_uriPattern : string
- URI pattern
- __construct() : mixed
- Constructor.
- action() : Core_Router_Route
- Set action name
- applyPattern() : mixed
- Apply pattern
- check() : bool
- Check URI
- controller() : Core_Router_Route
- Set controller name
- execute() : mixed
- Set controller columns and execute command controller method '{action}Action()'.
- setUri() : Core_Router_Route
- Set URI
Properties
$_action
Action name
protected
string
$_action
= 'show'
$_controller
Controller name
protected
string
$_controller
= 'Core_Command_Controller_Default'
$_controllerColumns
Array of columns will be set for controller object
protected
array<string|int, mixed>
$_controllerColumns
= array()
$_pregPattern
Preg pattern
protected
string
$_pregPattern
= \NULL
$_uri
URI
protected
string
$_uri
= \NULL
$_uriPattern
URI pattern
protected
string
$_uriPattern
= \NULL
Methods
__construct()
Constructor.
public
__construct([string $uriPattern = NULL ][, array<string|int, mixed> $expressions = array() ]) : mixed
Parameters
- $uriPattern : string = NULL
-
URI pattern. Named subpatterns {name} can consist of up to 32 alphanumeric characters and underscores, but must start with a non-digit.
- $expressions : array<string|int, mixed> = array()
-
list of expressions
Return values
mixed —action()
Set action name
public
action(string $actionName) : Core_Router_Route
Parameters
- $actionName : string
Return values
Core_Router_Route —applyPattern()
Apply pattern
public
applyPattern(string $uri) : mixed
Parameters
- $uri : string
-
URI
Return values
mixed —array with data from URI or NULL
check()
Check URI
public
check(string $uri) : bool
Parameters
- $uri : string
-
URI
Return values
bool —controller()
Set controller name
public
controller(string $controllerName) : Core_Router_Route
Parameters
- $controllerName : string
Return values
Core_Router_Route —execute()
Set controller columns and execute command controller method '{action}Action()'.
public
execute() : mixed
Default action name is showAction()
Return values
mixed —expect Core_Response
setUri()
Set URI
public
setUri(string $uri) : Core_Router_Route
Parameters
- $uri : string
-
URI