namespace Nette\Application
Class Route
The bidirectional route is responsible for mapping HTTP request to a PresenterRequest object for dispatch and vice-versa.
- Nette\Object
-
Nette\Application\Route implements IRouter
public
|
#
__construct(
string
$mask,
array|string
$metadata = array (
),
int
$flags = 0
)
Parameters$mask string URL mask, e.g. '<presenter>/<action>/<id \d{1,3}>'$metadata array|string default values or metadata$flags int flags |
public
PresenterRequest|NULL
|
#
match(
Nette\Web\IHttpRequest
$httpRequest
)
Maps HTTP request to a PresenterRequest object. Maps HTTP request to a PresenterRequest object. Parameters$httpRequest Nette\Web\IHttpRequestImplementation of |
public
string|NULL
|
#
constructUrl(
PresenterRequest
$appRequest,
Nette\Web\Uri
$refUri
)
Constructs absolute URL from PresenterRequest object. Constructs absolute URL from PresenterRequest object. Parameters$appRequest PresenterRequest$refUri Nette\Web\UriImplementation of |
public
string
|
#
getMask(
)
Returns mask. Returns mask. |
public
array
|
#
getDefaults(
)
Returns default values. Returns default values. |
public
string|FALSE
|
#
getTargetPresenter(
)
Proprietary cache aim. Proprietary cache aim. |
public static
void
|
#
addStyle(
string
$style,
string
$parent = '#'
)
Creates new style. Creates new style. Parameters$style string style name (#style, urlParameter, ?queryParameter)$parent string optional parent style name |
public static
void
|
#
setStyleProperty(
string
$style,
string
$key,
mixed
$value
)
Changes style property value. Changes style property value. Parameters$style string style name (#style, urlParameter, ?queryParameter)$key string property name (Route::PATTERN, Route::FILTER_IN, Route::FILTER_OUT, Route::FILTER_TABLE)$value mixed property value |
Methods Inherited From Nette\Object
getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
PRESENTER_KEY |
'presenter' # |
MODULE_KEY |
'module' # |
CASE_SENSITIVE |
256 # |
HOST |
1 # |
PATH |
2 # |
RELATIVE |
3 # |
VALUE |
'value' # |
PATTERN |
'pattern' # |
FILTER_IN |
'filterIn' # |
FILTER_OUT |
'filterOut' # |
FILTER_TABLE |
'filterTable' # |
OPTIONAL |
0 # |
PATH_OPTIONAL |
1 # |
CONSTANT |
2 # |
ONE_WAY |
1 # |
SECURED |
2 # |
static
bool
|
$defaultFlags | 0 |
# |
static
array
|
$styles | array ( '#' => array ( 'pattern' => '[^/]+', 'filterIn' => 'rawurldecode', 'filterOut' => 'rawurlencode', ), '?#' => array ( ), 'module' => array ( 'pattern' => '[a-z][a-z0-9.-]*', 'filterIn' => array ( 0 => 'Nette\\Application\\Route', 1 => 'path2presenter', ), 'filterOut' => array ( 0 => 'Nette\\Application\\Route', 1 => 'presenter2path', ), ), 'presenter' => array ( 'pattern' => '[a-z][a-z0-9.-]*', 'filterIn' => array ( 0 => 'Nette\\Application\\Route', 1 => 'path2presenter', ), 'filterOut' => array ( 0 => 'Nette\\Application\\Route', 1 => 'presenter2path', ), ), 'action' => array ( 'pattern' => '[a-z][a-z0-9-]*', 'filterIn' => array ( 0 => 'Nette\\Application\\Route', 1 => 'path2action', ), 'filterOut' => array ( 0 => 'Nette\\Application\\Route', 1 => 'action2path', ), ), '?module' => array ( ), '?presenter' => array ( ), '?action' => array ( ), ) |
# |