PHP Класс Symfony\Cmf\Bundle\RoutingBundle\Model\Route

Автор: [email protected]
Наследование: extends Symfony\Component\Routing\Route, implements Symfony\Cmf\Component\Routing\RouteObjectInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$content object The referenced content object.
$id string Unique id of this route.
$needRecompile boolean State information not persisted in storage.
$staticPrefix string Note that this field is not used by PHPCR-ODM
$variablePattern string Variable pattern part. The static part of the pattern is the id without the prefix.

Открытые методы

Метод Описание
__construct ( array $options = [] ) Overwrite to be able to create route without pattern.
compile ( )
getContent ( )
getId ( ) Get the repository path of this url entry.
getOption ( $name )
getOptions ( )
getPath ( )
getRouteKey ( )
getStaticPrefix ( ) : string
getVariablePattern ( ) : string
setContent ( mixed $object ) Set the object this url points to.
setOptions ( array $options )
setPath ( $pattern )
setStaticPrefix ( string $prefix ) : Route
setVariablePattern ( string $variablePattern ) : Route

Защищенные методы

Метод Описание
isBooleanOption ( string $name ) Helper method to check if an option is a boolean option to allow better forms.

Описание методов

__construct() публичный метод

Additional supported options are: * add_format_pattern: When set, ".{_format}" is appended to the route pattern. Also implicitly sets a default/require on "_format" to "html". * add_locale_pattern: When set, "/{_locale}" is prepended to the route pattern.
public __construct ( array $options = [] )
$options array

compile() публичный метод

Overwritten to make sure the route is recompiled if the pattern was changed
public compile ( )

getContent() публичный метод

public getContent ( )

getId() публичный метод

Get the repository path of this url entry.
public getId ( )

getOption() публичный метод

Handling the missing default 'compiler_class'
См. также: setOptions
public getOption ( $name )

getOptions() публичный метод

Handling the missing default 'compiler_class'
См. также: setOptions
public getOptions ( )

getPath() публичный метод

public getPath ( )

getRouteKey() публичный метод

public getRouteKey ( )

getStaticPrefix() публичный метод

public getStaticPrefix ( ) : string
Результат string the static prefix part of this route

getVariablePattern() публичный метод

public getVariablePattern ( ) : string
Результат string the variable part of the url pattern

isBooleanOption() защищенный метод

Helper method to check if an option is a boolean option to allow better forms.
protected isBooleanOption ( string $name )
$name string

setContent() публичный метод

Set the object this url points to.
public setContent ( mixed $object )
$object mixed A content object that can be persisted by the storage layer.

setOptions() публичный метод

Prevent setting the default 'compiler_class' so that we do not persist it
public setOptions ( array $options )
$options array

setPath() публичный метод

It is recommended to use setVariablePattern to just set the part after the static part. If you use this method, it will ensure that the static part is not changed and only change the variable part. When using PHPCR-ODM, make sure to persist the route before calling this to have the id field initialized.
public setPath ( $pattern )

setStaticPrefix() публичный метод

public setStaticPrefix ( string $prefix ) : Route
$prefix string The static prefix part of this route
Результат Route $this

setVariablePattern() публичный метод

public setVariablePattern ( string $variablePattern ) : Route
$variablePattern string the variable part of the url pattern
Результат Route

Описание свойств

$content защищенное свойство

The referenced content object.
protected object $content
Результат object

$id защищенное свойство

Unique id of this route.
protected string $id
Результат string

$needRecompile защищенное свойство

State information not persisted in storage.
protected bool $needRecompile
Результат boolean

$staticPrefix защищенное свойство

Note that this field is not used by PHPCR-ODM
protected string $staticPrefix
Результат string

$variablePattern защищенное свойство

Variable pattern part. The static part of the pattern is the id without the prefix.
protected string $variablePattern
Результат string