PHP Class Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute

This extends the RedirectRoute Model. We need to re-implement everything that the PHPCR Route document adds.
Inheritance: extends Symfony\Cmf\Bundle\RoutingBundle\Model\RedirectRoute, implements Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\PrefixInterface, implements Doctrine\ODM\PHPCR\HierarchyInterface
Afficher le fichier Open project: symfony-cmf/routing-bundle Class Usage Examples

Protected Properties

Свойство Type Description
$children Doctrine\Common\Collections\Collection Child route documents.
$idPrefix string This field is not persisted in storage.
$name string PHPCR node name.
$parent object parent document.

Méthodes publiques

Méthode Description
__construct ( array $options = [] ) Overwrite to be able to create route without pattern.
generateStaticPrefix ( string $id, string $idPrefix ) : string
getName ( )
getParentDocument ( )
getPath ( )
getPrefix ( )
getRouteChildren ( ) : array Return this routes children.
getStaticPrefix ( )
setId ( string $id ) PHPCR documents can be moved by setting the id to a new path.
setName ( string $name ) Rename a route by setting its new name.
setParentDocument ( object $parent ) Move the route by setting a parent.
setPath ( $pattern )
setPosition ( $parent, $name ) Convenience method to set parent and name at the same time.
setPrefix ( $idPrefix )
setStaticPrefix ( $prefix )

Méthodes protégées

Méthode Description
isBooleanOption ( $name )

Method Details

__construct() public méthode

Additional options: * add_trailing_slash: When set, a trailing slash is appended to the route
public __construct ( array $options = [] )
$options array

generateStaticPrefix() public méthode

public generateStaticPrefix ( string $id, string $idPrefix ) : string
$id string PHPCR id of this document
$idPrefix string part of the id that can be removed
Résultat string the static part of the pattern of this route

getName() public méthode

public getName ( )

getParentDocument() public méthode

public getParentDocument ( )

getPath() public méthode

public getPath ( )

getPrefix() public méthode

public getPrefix ( )

getRouteChildren() public méthode

Filters out children that do not implement the RouteObjectInterface.
public getRouteChildren ( ) : array
Résultat array - array of RouteObjectInterface's

getStaticPrefix() public méthode

Overwrite model method as we need to build this
public getStaticPrefix ( )

isBooleanOption() protected méthode

protected isBooleanOption ( $name )

setId() public méthode

PHPCR documents can be moved by setting the id to a new path.
public setId ( string $id )
$id string

setName() public méthode

Note that this will change the URL this route matches.
public setName ( string $name )
$name string the new name

setParentDocument() public méthode

Note that this will change the URL this route matches.
public setParentDocument ( object $parent )
$parent object the new parent document

setPath() public méthode

public setPath ( $pattern )

setPosition() public méthode

The url will be the url of the parent plus the supplied name.
public setPosition ( $parent, $name )

setPrefix() public méthode

public setPrefix ( $idPrefix )

setStaticPrefix() public méthode

Overwritten to translate into a move operation.
public setStaticPrefix ( $prefix )

Property Details

$children protected_oe property

Child route documents.
protected Collection,Doctrine\Common\Collections $children
Résultat Doctrine\Common\Collections\Collection

$idPrefix protected_oe property

This field is not persisted in storage.
protected string $idPrefix
Résultat string

$name protected_oe property

PHPCR node name.
protected string $name
Résultat string

$parent protected_oe property

parent document.
protected object $parent
Résultat object