Class Route (namespace Nette\Application)


The bidirectional route is responsible for mapping HTTP request to a PresenterRoute object for dispatch and vice-versa.

Object
   |
   --Route

Implements interfaces:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Application/Route.php (line 36)
Public Method Summary
static void
addStyle (string $style, [string $parent = '#'], void 2)
Creates new style.
string|NULL
constructUrl (PresenterRequest $appRequest, $httpRequest)
Constructs absolute URL from PresenterRequest object.
Route
__construct (string $mask, [$defaults = array()], [int $flags = 0])
array
Returns default values.
string
getMask ()
Returns mask.
string|FALSE
Proprietary cache aim.
PresenterRequest|NULL
match ($httpRequest)
Maps HTTP request to a PresenterRequest object.
static void
setStyleProperty (string $style, string $key, mixed $value, void 3)
Changes style property value.
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Constant Summary
int CASE_SENSITIVE 256

line 42

flag
string FILTER_IN 'filterIn'

line 52

key used in Route::$styles
string FILTER_OUT 'filterOut'

line 53

key used in Route::$styles
string FILTER_TABLE 'filterTable'

line 54

key used in Route::$styles
int HOST 1

line 45

uri type
string MODULE_KEY 'module'

line 39

int PATH 2

line 46

uri type
string PATTERN 'pattern'

line 51

key used in Route::$styles
string PRESENTER_KEY 'presenter'

line 38

int RELATIVE 3

line 47

uri type
Variable Summary
static bool $defaultFlags 0

line 64

protected int $flags

line 117

protected array $metadata array()

line 108

of [default & fixity, filterIn, filterOut]
static array $styles array( '#' => array( // default style for path parameters self::PATTERN => '[^/]+',...

line 67

protected int $type

line 114

HOST, PATH, RELATIVE
protected array $xlat

line 111


Method Details

line 703

addStyle

public static void addStyle (string $style, [string $parent = '#'], void 2)

Creates new style.

Input
string $style style name (#style, urlParameter, ?queryParameter)
string $parent optional parent style name
void 2
Output
void  

line 252

constructUrl

public string|NULL constructUrl (PresenterRequest $appRequest, $httpRequest)

Constructs absolute URL from PresenterRequest object.

Implementation of:

Input
PresenterRequest $appRequest
$httpRequest
Output
string|NULL  

line 126

__construct

public Route __construct (string $mask, [$defaults = array()], [int $flags = 0])

Input
string $mask URL mask, e.g. '<presenter>/<action>/<id \d{1,3}>'
$defaults default values
int $flags flags
Output
Route  

line 553

getDefaults

public array getDefaults ()

Returns default values.

Output
array  

line 542

getMask

public string getMask ()

Returns mask.

Output
string  

line 574

getTargetPresenter

public string|FALSE getTargetPresenter ()

Proprietary cache aim.

Output
string|FALSE  

line 139

match

public PresenterRequest|NULL match ($httpRequest)

Maps HTTP request to a PresenterRequest object.

Implementation of:

Input
$httpRequest
Output
PresenterRequest|NULL  

line 729

setStyleProperty

public static void setStyleProperty (string $style, string $key, mixed $value, void 3)

Changes style property value.

Input
string $style style name (#style, urlParameter, ?queryParameter)
string $key property name (Route::PATTERN, Route::FILTER_IN, Route::FILTER_OUT, Route::FILTER_TABLE)
mixed $value property value
void 3
Output
void