Symfony\Component\Routing\Router
The Router class is an example of the integration of all pieces of the routing system for easier use.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Router
implements
RouterInterface
{
- // members
- protected UrlMatcherInterface|null $matcher;
- protected UrlGeneratorInterface|null $generator;
- protected RequestContext $context;
- protected LoaderInterface $loader;
- protected RouteCollection|null $collection;
- protected mixed $resource;
- protected array $options;
- protected LoggerInterface|null $logger;
- // methods
- public void __construct()
- public void setOptions()
- public void setOption()
- public mixed getOption()
- public void getRouteCollection()
- public void setContext()
- public void getContext()
- public void generate()
- public void match()
- public UrlMatcherInterface getMatcher()
- public UrlGeneratorInterface getGenerator()
Hierarchy
Extended by
Implements
Members
protected
- $collection — Symfony\Component\Routing\RouteCollection|null
- $context — Symfony\Component\Routing\RequestContext
- $generator — Symfony\Component\Routing\UrlGeneratorInterface|null
- $loader — Symfony\Component\Config\Loader\LoaderInterface
- $logger — Symfony\Component\Routing\LoggerInterface|null
- $matcher — Symfony\Component\Routing\UrlMatcherInterface|null
- $options — array
- $resource — mixed
Methods
public
- __construct() — Constructor.
- generate() — {@inheritdoc}
- getContext() — {@inheritdoc}
- getGenerator() — Gets the UrlGenerator instance associated with this Router.
- getMatcher() — Gets the UrlMatcher instance associated with this Router.
- getOption() — Gets an option value.
- getRouteCollection() — {@inheritdoc}
- match() — {@inheritdoc}
- setContext() — {@inheritdoc}
- setOption() — Sets an option.
- setOptions() — Sets options.