Documentation

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
subpackage

Core\Router

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_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

Methods

__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

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

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


        
On this page

Search results