[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/routing/Symfony/Component/Routing/ -> RouteCollection.php (summary)

(no description)

File Size: 263 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RouteCollection:: (17 methods):
  __clone()
  getIterator()
  count()
  add()
  all()
  get()
  remove()
  addCollection()
  addPrefix()
  setHost()
  addDefaults()
  addRequirements()
  addOptions()
  setSchemes()
  setMethods()
  getResources()
  addResource()


Class: RouteCollection  - X-Ref

A RouteCollection represents a set of Route instances.

When adding a route at the end of the collection, an existing route
with the same name is removed first. So there can only be one route
with a given name.

__clone()   X-Ref


getIterator()   X-Ref
Gets the current RouteCollection as an Iterator that includes all routes.

It implements \IteratorAggregate.

return: \ArrayIterator An \ArrayIterator object for iterating over routes

count()   X-Ref
Gets the number of Routes in this collection.

return: int The number of routes

add($name, Route $route)   X-Ref
Adds a route.

param: string $name  The route name
param: Route  $route A Route instance

all()   X-Ref
Returns all routes in this collection.

return: Route[] An array of routes

get($name)   X-Ref
Gets a route by name.

param: string $name The route name
return: Route|null A Route instance or null when not found

remove($name)   X-Ref
Removes a route or an array of routes by name from the collection.

param: string|array $name The route name or an array of route names

addCollection(RouteCollection $collection)   X-Ref
Adds a route collection at the end of the current set by appending all
routes of the added collection.

param: RouteCollection $collection A RouteCollection instance

addPrefix($prefix, array $defaults = array()   X-Ref
Adds a prefix to the path of all child routes.

param: string $prefix       An optional prefix to add before each pattern of the route collection
param: array  $defaults     An array of default values
param: array  $requirements An array of requirements

setHost($pattern, array $defaults = array()   X-Ref
Sets the host pattern on all routes.

param: string $pattern      The pattern
param: array  $defaults     An array of default values
param: array  $requirements An array of requirements

addDefaults(array $defaults)   X-Ref
Adds defaults to all routes.

An existing default value under the same name in a route will be overridden.

param: array $defaults An array of default values

addRequirements(array $requirements)   X-Ref
Adds requirements to all routes.

An existing requirement under the same name in a route will be overridden.

param: array $requirements An array of requirements

addOptions(array $options)   X-Ref
Adds options to all routes.

An existing option value under the same name in a route will be overridden.

param: array $options An array of options

setSchemes($schemes)   X-Ref
Sets the schemes (e.g. 'https') all child routes are restricted to.

param: string|array $schemes The scheme or an array of schemes

setMethods($methods)   X-Ref
Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.

param: string|array $methods The method or an array of methods

getResources()   X-Ref
Returns an array of resources loaded to build this collection.

return: ResourceInterface[] An array of resources

addResource(ResourceInterface $resource)   X-Ref
Adds a resource for this collection.

param: ResourceInterface $resource A resource instance



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1