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:

IRouter
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Application/Route.php (line 39)
Constructor Summary
public
__construct (string $mask, [$defaults = array()], [int $flags = 0])
Method Summary
static void
addStyle (string $style, [string $parent = '#'], void 2)
Creates new style.
string|NULL
constructUrl (PresenterRequest $request, $context)
Constructs absolute URL from PresenterRequest object.
string|FALSE
Proprietary cache aim.
PresenterRequest|NULL
match ($context)
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
Object::extensionMethod(), Object::getClass(), Object::getReflection(), Object::__call(), Object::__callStatic(), Object::__get(), Object::__isset(), Object::__set(), Object::__unset()
Constant Summary
int CASE_SENSITIVE 256

line 45

flag
int CONSTANT 2

line 63

string FILTER_IN 'filterIn'

line 55

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

line 56

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

line 57

key used in Route::$styles
int HOST 1

line 48

uri type
string MODULE_KEY 'module'

line 42

int OPTIONAL 0

line 61

int PATH 2

line 49

uri type
int PATH_OPTIONAL 1

line 62

string PATTERN 'pattern'

line 54

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

line 41

int RELATIVE 3

line 50

uri type
Variable Summary
static bool $defaultFlags 0

line 67

protected int $flags

line 120

string $mask

line 102

protected array $metadata array()

line 111

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

line 70

protected int $type

line 117

HOST, PATH, RELATIVE
protected array $xlat

line 114


Constructor Details

line 129

__construct

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

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

line 670

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 249

constructUrl

public string|NULL constructUrl (PresenterRequest $request, $context)

Constructs absolute URL from PresenterRequest object.

Implementation of:

Input
PresenterRequest $request
$context
Output
string|NULL  

line 540

getTargetPresenter

public string|FALSE getTargetPresenter ()

Proprietary cache aim.

Output
string|FALSE  

line 142

match

public PresenterRequest|NULL match ($context)

Maps HTTP request to a PresenterRequest object.

Implementation of:

Input
$context
Output
PresenterRequest|NULL  

line 696

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