RouterCacheWarmer::isOptional()

bool isOptional() Checks whether this warmer is optional or not. Return Value bool true if the warmer is optional, false otherwise

RouterCacheWarmer::warmUp()

warmUp(string $cacheDir) Warms up the cache. Parameters string $cacheDir The cache directory

RouterCacheWarmer

class RouterCacheWarmer implements CacheWarmerInterface Generates the router matcher and generator classes. Methods __construct(RouterInterface $router) Constructor. warmUp(string $cacheDir) Warms up the cache. bool isOptional() Checks whether this warmer is optional or not. Details __construct(RouterInterface $router) Constructor. Parameters RouterInterface $router A Router instance warmUp(string $ca

Router::warmUp()

warmUp(string $cacheDir) Warms up the cache. Parameters string $cacheDir The cache directory

Router::setOption()

setOption(string $key, mixed $value) Sets an option. Parameters string $key The key mixed $value The value Exceptions InvalidArgumentException

Router::setOptions()

setOptions(array $options) Sets options. Available options: cache_dir: The cache directory (or null to disable caching) debug: Whether to enable debugging or not (false by default) generator_class: The name of a UrlGeneratorInterface implementation generatorbaseclass: The base class for the dumped generator class generatorcacheclass: The class name for the dumped generator class generatordumperclass: The name of a GeneratorDumperInterface implementation matcher_class: The name of a U

Router::setConfigCacheFactory()

setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) Sets the ConfigCache factory to use. Parameters ConfigCacheFactoryInterface $configCacheFactory The factory to use

Router::matchRequest()

array matchRequest(Request $request) Tries to match a request with a set of routes. If the matcher can not find information, it must throw one of the exceptions documented below. Parameters Request $request The request to match Return Value array An array of parameters Exceptions ResourceNotFoundException If no matching resource could be found MethodNotAllowedException If a matching resource was found but the request method is not allowed

Router::setContext()

setContext(RequestContext $context) Sets the request context. Parameters RequestContext $context The context

Router::getOption()

mixed getOption(string $key) Gets an option value. Parameters string $key The key Return Value mixed The value Exceptions InvalidArgumentException