phpBB API Documentation
Class

phpbb\routing\router

class router implements RouterInterface

Integration of all pieces of the routing system for easier use.

Methods

__construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, string $php_ext, string $cache_dir)

Construct method

RouteCollection get_routes()

Get the list of routes

getRouteCollection()

{@inheritdoc}

setContext(RequestContext $context)

{@inheritdoc}

getContext()

{@inheritdoc}

generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)

{@inheritdoc}

match($pathinfo)

{@inheritdoc}

UrlMatcherInterface get_matcher()

Gets the UrlMatcher instance associated with this Router.

UrlGeneratorInterface get_generator()

Gets the UrlGenerator instance associated with this Router.

Details

at line 92
public __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, string $php_ext, string $cache_dir)

Construct method

Parameters

ContainerInterface $container DI container
resources_locator_interface $resources_locator Resources locator
LoaderInterface $loader Resources loader
string $php_ext PHP file extension
string $cache_dir phpBB cache directory

at line 107
public RouteCollection get_routes()

Get the list of routes

Return Value

RouteCollection Get the route collection

at line 133
public getRouteCollection()

{@inheritdoc}

at line 141
public setContext(RequestContext $context)

{@inheritdoc}

Parameters

RequestContext $context

at line 158
public getContext()

{@inheritdoc}

at line 166
public generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)

{@inheritdoc}

Parameters

$name
$parameters
$referenceType

at line 174
public match($pathinfo)

{@inheritdoc}

Parameters

$pathinfo

at line 184
public UrlMatcherInterface get_matcher()

Gets the UrlMatcher instance associated with this Router.

Return Value

UrlMatcherInterface A UrlMatcherInterface instance

at line 239
public UrlGeneratorInterface get_generator()

Gets the UrlGenerator instance associated with this Router.

Return Value

UrlGeneratorInterface A UrlGeneratorInterface instance