Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • CliRouter
  • Route
  • RouteList
  • SimpleRouter
  • Overview
  • Namespace
  • 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.

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

Parameters

$mask
mask, e.g. '<presenter>/<action>/<id \d{1,3}>'
$metadata
values or metadata or callback for NetteModule\MicroPresenter
$flags
flags
public Nette\Application\Request|null
# match( Nette\Http\IRequest $httpRequest )

Maps HTTP request to a Request object.

Maps HTTP request to a Request object.

Returns

Nette\Application\Request|null
Nette\Application\Request|NULL

Implementation of

Nette\Application\IRouter::match()
public string|null
# constructUrl( Nette\Application\Request $appRequest, Nette\Http\Url $refUrl )

Constructs absolute URL from Request object.

Constructs absolute URL from Request object.

Returns

string|null
string|NULL

Implementation of

Nette\Application\IRouter::constructUrl()
public string
# getMask( )

Returns mask.

Returns mask.

Returns

string
string
public array
# getDefaults( )

Returns default values.

Returns default values.

Returns

array
array
public integer
# getFlags( )

Returns flags.

Returns flags.

Returns

integer
int
public static
# addStyle( $style, $parent = '#' )

Deprecated

public static
# setStyleProperty( $style, $key, $value )

Deprecated

Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
string PRESENTER_KEY
#'presenter'
string MODULE_KEY
#'module'
integer CASE_SENSITIVE

Deprecated

#256
integer HOST
#1
integer PATH
#2
integer RELATIVE
#3
string VALUE

key used in Nette\Application\Routers\Route::$styles or metadata Nette\Application\Routers\Route::__construct()

key used in Nette\Application\Routers\Route::$styles or metadata Nette\Application\Routers\Route::__construct()

#'value'
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 Nette\Application\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_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 inherited from Nette\Object
$reflection
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0