PHP Class Symfony\Cmf\Bundle\RoutingBundle\Model\Route

Inheritance: extends Symfony\Component\Routing\Route, implements Symfony\Cmf\Component\Routing\RouteObjectInterface
Afficher le fichier Open project: symfony-cmf/routing-bundle Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

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

Method Details

__construct() public méthode

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() public méthode

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

getContent() public méthode

public getContent ( )

getId() public méthode

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

getOption() public méthode

Handling the missing default 'compiler_class'
See also: setOptions
public getOption ( $name )

getOptions() public méthode

Handling the missing default 'compiler_class'
See also: setOptions
public getOptions ( )

getPath() public méthode

public getPath ( )

getRouteKey() public méthode

public getRouteKey ( )

getStaticPrefix() public méthode

public getStaticPrefix ( ) : string
Résultat string the static prefix part of this route

getVariablePattern() public méthode

public getVariablePattern ( ) : string
Résultat string the variable part of the url pattern

isBooleanOption() protected méthode

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

setContent() public méthode

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() public méthode

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

setPath() public méthode

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 méthode

public setStaticPrefix ( string $prefix ) : Route
$prefix string The static prefix part of this route
Résultat Route $this

setVariablePattern() public méthode

public setVariablePattern ( string $variablePattern ) : Route
$variablePattern string the variable part of the url pattern
Résultat Route

Property Details

$content protected_oe property

The referenced content object.
protected object $content
Résultat object

$id protected_oe property

Unique id of this route.
protected string $id
Résultat string

$needRecompile protected_oe property

State information not persisted in storage.
protected bool $needRecompile
Résultat boolean

$staticPrefix protected_oe property

Note that this field is not used by PHPCR-ODM
protected string $staticPrefix
Résultat string

$variablePattern protected_oe property

Variable pattern part. The static part of the pattern is the id without the prefix.
protected string $variablePattern
Résultat string