phpDocumentor

ApiRouteRegistration implements Bootstrapper

Class ApiRouteRegistration

Interfaces, Classes and Traits

Bootstrapper
Interface Bootstrapper

Table of Contents

CACHE_KEY  = 'api_routes'
CACHE_NAMESPACE  = 'application_routes'
boot()  : void
Application bootstrapping.
getCacheFactory()  : CacheFactory
getEnvironment()  : Environment
getRouteCollector()  : RouteCollector
Returns a slim application instance.
getRoutes()  : array<string|int, mixed>
Returns a list of absolute file paths for route files.
registerBaseAction()  : void
registerRoutes()  : void
Registers the route files.

Constants

Methods

getRoutes()

Returns a list of absolute file paths for route files.

private getRoutes() : array<string|int, mixed>

Route files are determined by their location and filename. Files called routes.php in Modules and Submodules of the Gambio\Api are loaded from the system.

Return values
array<string|int, mixed>

registerRoutes()

Registers the route files.

private registerRoutes(array<string|int, mixed> $routes, RouteCollector $routeCollector) : void

It must be ensured that each element in $routes is a valid filepath, which is done by using array_filter($data, 'is_file') in ::getRoutes.

Parameters
$routes : array<string|int, mixed>
$routeCollector : RouteCollector
Tags
see
ApiRouteRegistration::getRoutes()
Return values
void

Search results