Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Route

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

Object
Extended by Route implements IRouter
Package: Nette\Application\Routers
Author: David Grudl
Located at Application/Routers/Route.php
Methods summary
public
# __construct( string $mask, array|string $metadata = array(), integer $flags = 0 )

Parameters

$mask
string
URL mask, e.g. '<presenter>/<action>/<id \d{1,3}>'
$metadata
array|string
default values or metadata
$flags
integer
flags
public PresenterRequest|null
# match( IHttpRequest $httpRequest )

Maps HTTP request to a Request object.

Maps HTTP request to a Request object.

Returns

PresenterRequest|null

Implementation of

IRouter::match()
public string|null
# constructUrl( PresenterRequest $appRequest, Url $refUrl )

Constructs absolute URL from Request object.

Constructs absolute URL from Request object.

Returns

string|null

Implementation of

IRouter::constructUrl()
public string
# getMask( )

Returns mask.

Returns mask.

Returns

string
public array
# getDefaults( )

Returns default values.

Returns default values.

Returns

array
public integer
# getFlags( )

Returns flags.

Returns flags.

Returns

integer
public string|false
# getTargetPresenter( )

Proprietary cache aim.

Proprietary cache aim.

Returns

string|false
public static
# 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
# 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 Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
string PRESENTER_KEY 'presenter'
#
string MODULE_KEY 'module'
#
integer CASE_SENSITIVE 256
#

flag

flag

integer HOST 1
#
integer PATH 2
#
integer RELATIVE 3
#
string VALUE 'value'
#

key used in Route::$styles or metadata Route::__construct()

key used in Route::$styles or metadata Route::__construct()

string PATTERN 'pattern'
#
string FILTER_IN 'filterIn'
#
string FILTER_OUT 'filterOut'
#
string FILTER_TABLE 'filterTable'
#
string FILTER_STRICT 'filterStrict'
#
integer OPTIONAL 0
#
integer PATH_OPTIONAL 1
#
integer CONSTANT 2
#
Constants inherited from IRouter
ONE_WAY, SECURED
Properties summary
public static integer $defaultFlags 0
#
public static array $styles array( '#' => array( // default style for path parameters self::PATTERN => '[^/]+', self::FILTER_IN => 'rawurldecode', self::FILTER_OUT => array(__CLASS__, 'param2path'), ), '?#' => array( // default style for query parameters ), 'module' => array( self::PATTERN => '[a-z][a-z0-9.-]*', self::FILTER_IN => array(__CLASS__, 'path2presenter'), self::FILTER_OUT => array(__CLASS__, 'presenter2path'), ), 'presenter' => array( self::PATTERN => '[a-z][a-z0-9.-]*', self::FILTER_IN => array(__CLASS__, 'path2presenter'), self::FILTER_OUT => array(__CLASS__, 'presenter2path'), ), 'action' => array( self::PATTERN => '[a-z][a-z0-9-]*', self::FILTER_IN => array(__CLASS__, 'path2action'), self::FILTER_OUT => array(__CLASS__, 'action2path'), ), '?module' => array( ), '?presenter' => array( ), '?action' => array( ), )
#
Magic properties summary
public read-only string $mask
#
public read-only array $defaults
#
public read-only integer $flags
#
public read-only string|false $targetPresenter
#
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0