interface RouterInterface (View source)

Methods

RequestContext
getContext()

Get the context that the router is running in.

setContext(RequestContext $context)

No description

UrlGeneratorInterface
getGenerator()

No description

setGenerator(UrlGeneratorInterface $generator)

No description

getList()

No description

setRequest(Request $req)

No description

Route
register(string $path, Closure|string $callback, string|null $handle = null, array $requirements = array(), array $options = array(), string $host = '', array|string $schemes = array(), array|string $methods = array(), string $condition = null)

Register a symfony route with as little as a path and a callback.

registerMultiple(array $routes)

No description

execute(Route $route, $parameters)

No description

setThemeByRoute($path, $theme = null, $wrapper = FILENAME_THEMES_VIEW)

Used by the theme_paths and site_theme_paths files in config/ to hard coded certain paths to various themes.

setThemesbyRoutes(array $routes)

No description

string|bool
getThemeByRoute(string $path)

This grabs the theme for a particular path, if one exists in the themePaths array.

route($data)

No description

Details

RequestContext getContext()

Get the context that the router is running in.

Return Value

RequestContext

setContext(RequestContext $context)

No description

Parameters

RequestContext $context

UrlGeneratorInterface getGenerator()

No description

Return Value

UrlGeneratorInterface

setGenerator(UrlGeneratorInterface $generator)

No description

Parameters

UrlGeneratorInterface $generator

getList()

No description

setRequest(Request $req)

No description

Parameters

Request $req

Route register(string $path, Closure|string $callback, string|null $handle = null, array $requirements = array(), array $options = array(), string $host = '', array|string $schemes = array(), array|string $methods = array(), string $condition = null)

Register a symfony route with as little as a path and a callback.

Parameters

string $path

The full path for the route

Closure|string $callback

\Closure or "dispatcher" or "\Namespace\Controller::action_method"

string|null $handle

The route handle, if one is not provided the handle is generated from the path "/" => "_"

array $requirements

The Parameter requirements, see Symfony Route constructor

array $options

The route options, see Symfony Route constructor

string $host

The host pattern this route requires, see Symfony Route constructor

array|string $schemes

The schemes or scheme this route requires, see Symfony Route constructor

array|string $methods

The HTTP methods this route requires, see see Symfony Route constructor

string $condition

see Symfony Route constructor

Return Value

Route

registerMultiple(array $routes)

No description

Parameters

array $routes

execute(Route $route, $parameters)

No description

Parameters

Route $route
$parameters

setThemeByRoute($path, $theme = null, $wrapper = FILENAME_THEMES_VIEW)

Used by the theme_paths and site_theme_paths files in config/ to hard coded certain paths to various themes.

Parameters

$path string
$theme

object, if null site theme is default

$wrapper

setThemesbyRoutes(array $routes)

No description

Parameters

array $routes

string|bool getThemeByRoute(string $path)

This grabs the theme for a particular path, if one exists in the themePaths array.

Parameters

string $path

Return Value

string|bool

route($data)

No description

Parameters

$data