Property | Type | Description | |
---|---|---|---|
$resources | |||
$routes |
Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( ) | Constructor. | |
add ( string $name, Symfony\Component\Routing\Route $route ) | Adds a route. | |
addCollection ( |
Adds a route collection to the current set of routes (at the end of the current set). | |
addCollection ( |
Adds a route collection to the current set of routes (at the end of the current set). | |
addPrefix ( string $prefix ) | Adds a prefix to all routes in the current set. | |
addPrefix ( string $prefix, array $defaults = [], array $requirements = [], array $options = [] ) | Adds a prefix to all routes in the current set. | |
addResource ( Symfony\Component\Config\Resource\ResourceInterface $resource ) | Adds a resource for this collection. | |
addResource ( Symfony\Component\Routing\Resource\ResourceInterface $resource ) | Adds a resource for this collection. | |
all ( ) : array | Returns the array of routes. | |
count ( ) : integer | Gets the number of Routes in this collection. | |
get ( string $name ) : Symfony\Component\Routing\Route | Gets a route by name. | |
get ( string $name ) : Symfony\Component\Routing\Route | null | Gets a route by name defined in this collection or its children. | |
getIterator ( ) : ArrayIterator | Gets the current RouteCollection as an Iterator that includes all routes and child route collections. | |
getParent ( ) : |
Gets the parent RouteCollection. | |
getPrefix ( ) : string | Returns the prefix that may contain placeholders. | |
getResources ( ) : Symfony\Component\Config\Resource\ResourceInterface[] | Returns an array of resources loaded to build this collection. | |
getResources ( ) : Symfony\Component\Routing\Resource\ResourceInterface[] | Returns an array of resources loaded to build this collection. | |
getRoot ( ) : |
Gets the root RouteCollection of the tree. | |
remove ( string | array $name ) | Removes a route or an array of routes by name from all connected collections (this instance and all parents and children). |
Method | Description | |
---|---|---|
hasCollection ( |
Checks whether the given RouteCollection is already set in any child of the current instance. | |
removeRecursively ( string $name ) : boolean | Removes a route by name from this collection and its children recursively. | |
setParent ( |
Sets the parent RouteCollection. It's only used internally from one RouteCollection to another. It makes no sense to be available as part of the public API. |
public addCollection ( |
||
$collection | A RouteCollection instance | |
$prefix | string | An optional prefix to add before each pattern of the route collection |
public addCollection ( |
||
$collection | A RouteCollection instance | |
$prefix | string | An optional prefix to add before each pattern of the route collection |
$defaults | array | An array of default values |
$requirements | array | An array of requirements |
$options | array | An array of options |
public addPrefix ( string $prefix, array $defaults = [], array $requirements = [], array $options = [] ) | ||
$prefix | string | An optional prefix to add before each pattern of the route collection |
$defaults | array | An array of default values |
$requirements | array | An array of requirements |
$options | array | An array of options |
public addResource ( Symfony\Component\Config\Resource\ResourceInterface $resource ) | ||
$resource | Symfony\Component\Config\Resource\ResourceInterface | A resource instance |
public addResource ( Symfony\Component\Routing\Resource\ResourceInterface $resource ) | ||
$resource | Symfony\Component\Routing\Resource\ResourceInterface | A resource instance |
public getIterator ( ) : ArrayIterator | ||
return | ArrayIterator | An \ArrayIterator interface |
public getResources ( ) : Symfony\Component\Config\Resource\ResourceInterface[] | ||
return | Symfony\Component\Config\Resource\ResourceInterface[] | An array of resources |
public getResources ( ) : Symfony\Component\Routing\Resource\ResourceInterface[] | ||
return | Symfony\Component\Routing\Resource\ResourceInterface[] | An array of resources |
public getRoot ( ) : |
||
return | The root RouteCollection |