Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
Slim\Interfaces\RouteCollectorInterface Interface Reference
Inheritance diagram for Slim\Interfaces\RouteCollectorInterface:
Slim\Routing\RouteCollector

Public Member Functions

 getBasePath ()
 Get the base path used in pathFor()
 
 getCacheFile ()
 Get path to FastRoute cache file.
 
 getDefaultInvocationStrategy ()
 Get default route invocation strategy.
 
 getNamedRoute (string $name)
 Get named route object.
 
 getRouteParser ()
 Get the route parser.
 
 getRoutes ()
 Get route objects.
 
 group (string $pattern, $callable)
 Add route group.
 
 lookupRoute (string $identifier)
 Lookup a route via the route's unique identifier.
 
 map (array $methods, string $pattern, $handler)
 Add route.
 
 removeNamedRoute (string $name)
 Remove named route.
 
 setBasePath (string $basePath)
 Set the base path used in pathFor()
 
 setCacheFile (string $cacheFile)
 Set path to FastRoute cache file.
 
 setDefaultInvocationStrategy (InvocationStrategyInterface $strategy)
 Set default route invocation strategy.
 

Member Function Documentation

◆ getBasePath()

Slim\Interfaces\RouteCollectorInterface::getBasePath ( )

Get the base path used in pathFor()

Implemented in Slim\Routing\RouteCollector.

◆ getCacheFile()

Slim\Interfaces\RouteCollectorInterface::getCacheFile ( )

Get path to FastRoute cache file.

Implemented in Slim\Routing\RouteCollector.

◆ getDefaultInvocationStrategy()

Slim\Interfaces\RouteCollectorInterface::getDefaultInvocationStrategy ( )

Get default route invocation strategy.

Implemented in Slim\Routing\RouteCollector.

◆ getNamedRoute()

Slim\Interfaces\RouteCollectorInterface::getNamedRoute ( string $name)

Get named route object.

Parameters
string$nameRoute name
Exceptions
RuntimeExceptionIf named route does not exist

Implemented in Slim\Routing\RouteCollector.

◆ getRouteParser()

Slim\Interfaces\RouteCollectorInterface::getRouteParser ( )

Get the route parser.

Implemented in Slim\Routing\RouteCollector.

◆ getRoutes()

Slim\Interfaces\RouteCollectorInterface::getRoutes ( )

Get route objects.

Return values
RouteInterface[]

Implemented in Slim\Routing\RouteCollector.

◆ group()

Slim\Interfaces\RouteCollectorInterface::group ( string $pattern,
$callable )

Add route group.

Parameters
string | callable$callable

Implemented in Slim\Routing\RouteCollector.

◆ lookupRoute()

Slim\Interfaces\RouteCollectorInterface::lookupRoute ( string $identifier)

Lookup a route via the route's unique identifier.

Exceptions
RuntimeExceptionIf route of identifier does not exist

Implemented in Slim\Routing\RouteCollector.

◆ map()

Slim\Interfaces\RouteCollectorInterface::map ( array $methods,
string $pattern,
$handler )

Add route.

Parameters
string[]$methodsArray of HTTP methods
string$patternThe route pattern
callable | string$handlerThe route callable

Implemented in Slim\Routing\RouteCollector.

◆ removeNamedRoute()

Slim\Interfaces\RouteCollectorInterface::removeNamedRoute ( string $name)

Remove named route.

Parameters
string$nameRoute name
Exceptions
RuntimeExceptionIf named route does not exist

Implemented in Slim\Routing\RouteCollector.

◆ setBasePath()

Slim\Interfaces\RouteCollectorInterface::setBasePath ( string $basePath)

Set the base path used in pathFor()

Implemented in Slim\Routing\RouteCollector.

◆ setCacheFile()

Slim\Interfaces\RouteCollectorInterface::setCacheFile ( string $cacheFile)

Set path to FastRoute cache file.

Exceptions
InvalidArgumentException
RuntimeException

Implemented in Slim\Routing\RouteCollector.

◆ setDefaultInvocationStrategy()

Slim\Interfaces\RouteCollectorInterface::setDefaultInvocationStrategy ( InvocationStrategyInterface $strategy)

Set default route invocation strategy.

Implemented in Slim\Routing\RouteCollector.


The documentation for this interface was generated from the following file: