\OCP\RouteIRouter

Interface IRouter

Summary

Methods
Constants
getRoutingFiles()
getCacheKey()
loadRoutes()
useCollection()
getCurrentCollection()
create()
match()
getGenerator()
generate()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getRoutingFiles()

getRoutingFiles() : array<mixed,string>

Get the files to load the routes from

Returns

array<mixed,string>

getCacheKey()

getCacheKey() : string

Returns

string

loadRoutes()

loadRoutes(null|string  $app = null) 

Loads the routes

Parameters

null|string $app

useCollection()

useCollection(string  $name) : void

Sets the collection to use for adding routes

Parameters

string $name

Name of the collection to use.

getCurrentCollection()

getCurrentCollection() : string

returns the current collection name in use for adding routes

Returns

string —

the collection name

create()

create(string  $name, string  $pattern, array  $defaults = array(), array  $requirements = array()) : \OCP\Route\IRoute

Create a \OCP\Route\IRoute.

Parameters

string $name

Name of the route to create.

string $pattern

The pattern to match

array $defaults

An array of default parameter values

array $requirements

An array of requirements for parameters (regexes)

Returns

\OCP\Route\IRoute

match()

match(string  $url) : void

Find the route matching $url.

Parameters

string $url

The url to find

Throws

\Exception

getGenerator()

getGenerator() 

Get the url generator

generate()

generate(string  $name, array  $parameters = array(), boolean  $absolute = false) : string

Generate url based on $name and $parameters

Parameters

string $name

Name of the route to use.

array $parameters

Parameters for the route

boolean $absolute

Returns

string