Property | Type | Description | |
---|---|---|---|
$container | Illuminate\Contracts\Container\Container | Application container instance. | |
$mergedRoutes | array | Array of merged old routes and API routes. | |
$oldRoutes | Illuminate\Routing\RouteCollection | Routes already defined on the router. | |
$router | Laravel router instance. | ||
$routes | array | Array of registered routes. |
Method | Description | |
---|---|---|
__construct ( |
Create a new laravel routing adapter instance. | |
addRoute ( array $methods, array $versions, string $uri, mixed $action ) : Illuminate\Routing\Route | Add a route to the appropriate route collection. | |
dispatch ( Illuminate\Http\Request $request, string $version ) : mixed | Dispatch a request. | |
gatherRouteMiddlewares ( Illuminate\Routing\Route $route ) : array | Gather the route middlewares. | |
getIterableRoutes ( string $version = null ) : mixed | Get a normalized iterable set of routes. | |
getRouteProperties ( mixed $route, Illuminate\Http\Request $request ) : array | Get the URI, methods, and action from the route. | |
getRouter ( ) : |
Get the Laravel router instance. | |
getRoutes ( string $version = null ) : mixed | Get all routes or only for a specific version. | |
prepareRouteForSerialization ( mixed $route ) : mixed | Prepare a route for serialization. | |
setRoutes ( array $routes ) : void | Set the routes on the adapter. |
Method | Description | |
---|---|---|
createRouteCollections ( array $versions ) : void | Create the route collections for the versions. | |
mergeOldRoutes ( string $version ) : array | Merge the old application routes with the API routes. |
public __construct ( |
||
$router | ||
return | void |
protected createRouteCollections ( array $versions ) : void | ||
$versions | array | |
return | void |
public gatherRouteMiddlewares ( Illuminate\Routing\Route $route ) : array | ||
$route | Illuminate\Routing\Route | |
return | array |
public getIterableRoutes ( string $version = null ) : mixed | ||
$version | string | |
return | mixed |
public getRouteProperties ( mixed $route, Illuminate\Http\Request $request ) : array | ||
$route | mixed | |
$request | Illuminate\Http\Request | |
return | array |
public getRouter ( ) : |
||
return |
protected mergeOldRoutes ( string $version ) : array | ||
$version | string | |
return | array |
public prepareRouteForSerialization ( mixed $route ) : mixed | ||
$route | mixed | |
return | mixed |
protected Container,Illuminate\Contracts\Container $container | ||
return | Illuminate\Contracts\Container\Container |
protected array $mergedRoutes | ||
return | array |
protected RouteCollection,Illuminate\Routing $oldRoutes | ||
return | Illuminate\Routing\RouteCollection |
protected Router,Illuminate\Routing $router | ||
return |