function RouteCollection::addResource
Adds a resource for this collection. If the resource already exists it is not added.
1 call to RouteCollection::addResource()
- RouteCollection::addCollection in vendor/
symfony/ routing/ RouteCollection.php - Adds a route collection at the end of the current set by appending all routes of the added collection.
File
-
vendor/
symfony/ routing/ RouteCollection.php, line 343
Class
- RouteCollection
- A RouteCollection represents a set of Route instances.
Namespace
Symfony\Component\RoutingCode
public function addResource(ResourceInterface $resource) : void {
$key = (string) $resource;
if (!isset($this->resources[$key])) {
$this->resources[$key] = $resource;
}
}