Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • AppForm
  • Application
  • CliRouter
  • Control
  • DownloadResponse
  • ForwardingResponse
  • JsonResponse
  • Link
  • MultiRouter
  • Presenter
  • PresenterComponent
  • PresenterLoader
  • PresenterRequest
  • RedirectingResponse
  • RenderResponse
  • Route
  • SimpleRouter

Interfaces

  • IPartiallyRenderable
  • IPresenter
  • IPresenterLoader
  • IPresenterResponse
  • IRenderable
  • IRouter
  • ISignalReceiver
  • IStatePersistent

Exceptions

  • AbortException
  • ApplicationException
  • BadRequestException
  • BadSignalException
  • ForbiddenRequestException
  • InvalidLinkException
  • InvalidPresenterException
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class Route

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

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

Parameters

$mask
string
URL mask, e.g. '<presenter>/<action>/<id \d{1,3}>'
$metadata
array
default values or metadata
$flags
integer
flags
public Nette\Application\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\IHttpRequest

Returns

Nette\Application\PresenterRequest|null

Implementation of

Nette\Application\IRouter::match
public string|null
# constructUrl( Nette\Application\PresenterRequest $appRequest, Nette\Web\IHttpRequest $httpRequest )

Constructs absolute URL from PresenterRequest object.

Constructs absolute URL from PresenterRequest object.

Parameters

$appRequest
Nette\Web\IHttpRequest
$httpRequest
Nette\Application\PresenterRequest

Returns

string|null

Implementation of

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

Returns mask.

Returns mask.

Returns

string
public array
# getDefaults( )

Returns default values.

Returns default values.

Returns

array
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 Nette\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 FULL_META 128
#
integer HOST 1
#
integer PATH 2
#
integer RELATIVE 3
#
string VALUE 'value'
#

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

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

string PATTERN 'pattern'
#
string FILTER_IN 'filterIn'
#
string FILTER_OUT 'filterOut'
#
string FILTER_TABLE 'filterTable'
#
integer OPTIONAL 0
#
integer PATH_OPTIONAL 1
#
integer CONSTANT 2
#
Constants inherited from Nette\Application\IRouter
ONE_WAY, SECURED
Properties summary
public static boolean $defaultFlags 0
#
public static array $styles array( '#' => array( // default style for path parameters self::PATTERN => '[^/]+', self::FILTER_IN => 'rawurldecode', self::FILTER_OUT => 'rawurlencode', ), '?#' => 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( ), )
#
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0