Свойство | Тип | Описание | |
---|---|---|---|
$accept | Accept parser instance. | ||
$adapter | Dingo\Api\Contract\Routing\Adapter | Routing adapter instance. | |
$conditionalRequest | boolean | Indicates if the request is conditional. | |
$container | Illuminate\Container\Container | Application container instance. | |
$currentRoute | The current route being dispatched. | ||
$domain | string | The API domain. | |
$exception | Dingo\Api\Contract\Debug\ExceptionHandler | Exception handler instance. | |
$groupStack | array | Group stack array. | |
$prefix | string | The API prefix. | |
$routesDispatched | integer | The number of routes dispatched. |
Метод | Описание | |
---|---|---|
__construct ( Dingo\Api\Contract\Routing\Adapter $adapter, Dingo\Api\Contract\Debug\ExceptionHandler $exception, Illuminate\Container\Container $container, string $domain, string $prefix ) : void | Create a new router instance. | |
addRoute ( string | array $methods, string $uri, string | array | callable $action ) : mixed | Add a route to the routing adapter. | |
any ( string $uri, array | string | callable $action ) : mixed | Create a new route that responding to all verbs. | |
createRoute ( array | Illuminate\Routing\Route $route ) : |
Create a new route instance from an adapter route. | |
current ( ) : Illuminate\Routing\Route | Get the currently dispatched route instance. | |
currentRouteAction ( ) : string | null | Get the current route action. | |
currentRouteName ( ) : string | null | Get the current route name. | |
currentRouteNamed ( string $name ) : boolean | Determine if the current route matches a given name. | |
currentRouteUses ( string $action ) : boolean | Determine if the current route action matches a given action. | |
delete ( string $uri, array | string | callable $action ) : mixed | Create a new DELETE route. | |
dispatch ( Dingo\Api\Http\Request $request ) : |
Dispatch a request via the adapter. | |
gatherRouteMiddlewares ( mixed $route ) : array | Gather the middleware for the given route. | |
get ( string $uri, array | string | callable $action ) : mixed | Create a new GET route. | |
getAdapterRoutes ( ) : array | Get the raw adapter routes. | |
getCurrentRequest ( ) : Dingo\Api\Http\Request | Get the current request instance. | |
getCurrentRoute ( ) : |
Get the current route instance. | |
getLastGroupPrefix ( ) : string | Get the prefix from the last group on the stack. | |
getRoutes ( string $version = null ) : mixed | Get all routes registered on the adapter. | |
getRoutesDispatched ( ) : integer | Get the number of routes dispatched. | |
group ( array $attributes, callable $callback ) : void | Create a new route group. | |
hasDispatchedRoutes ( ) : boolean | Determine if the router has dispatched any routes. | |
hasGroupStack ( ) : boolean | Determine if the router has a group stack. | |
is ( ) : boolean | Alias for the "currentRouteNamed" method. | |
match ( array | string $methods, string $uri, array | string | callable $action ) : mixed | Create a new route with the given verbs. | |
options ( string $uri, array | string | callable $action ) : mixed | Create a new OPTIONS route. | |
patch ( string $uri, array | string | callable $action ) : mixed | Create a new PATCH route. | |
post ( string $uri, array | string | callable $action ) : mixed | Create a new POST route. | |
put ( string $uri, array | string | callable $action ) : mixed | Create a new PUT route. | |
resource ( string $name, string $controller, array $options = [] ) : void | Register a resource controller. | |
resources ( array $resources ) : void | Register an array of resources. | |
setAdapterRoutes ( array $routes ) : void | Set the raw adapter routes. | |
setConditionalRequest ( boolean $conditionalRequest ) : void | Set the conditional request. | |
setCurrentRoute ( |
Set the current route instance. | |
uses ( ) : boolean | Alias for the "currentRouteUses" method. | |
version ( string $version, array | callable $second, callable $third = null ) : void | An alias for calling the group method, allows a more fluent API for registering a new API version group with optional attributes and a required callback. |
Метод | Описание | |
---|---|---|
addControllerMiddlewareToRouteAction ( array $action ) : array | Add the controller preparation middleware to the beginning of the routes middleware. | |
formatArrayBasedOption ( string $option, array $new ) : array | Format an array based option in a route action. | |
formatNamespace ( array $new, array $old ) : string | Format the namespace for the new group attributes. | |
formatPrefix ( array $new, array $old ) : string | Format the prefix for the new group attributes. | |
formatUses ( array $new, array $old ) : string | Format the uses key in a route action. | |
mergeGroup ( array $new, array $old ) : array | Merge the given group attributes. | |
mergeLastGroupAttributes ( array $attributes ) : array | Merge the last groups attributes. | |
prepareResponse ( mixed $response, Dingo\Api\Http\Request $request, string $format ) : |
Prepare a response by transforming and formatting it correctly. | |
requestIsConditional ( ) : boolean | Determine if the request is conditional. |
public __construct ( Dingo\Api\Contract\Routing\Adapter $adapter, Dingo\Api\Contract\Debug\ExceptionHandler $exception, Illuminate\Container\Container $container, string $domain, string $prefix ) : void | ||
$adapter | Dingo\Api\Contract\Routing\Adapter | |
$exception | Dingo\Api\Contract\Debug\ExceptionHandler | |
$container | Illuminate\Container\Container | |
$domain | string | |
$prefix | string | |
Результат | void |
protected addControllerMiddlewareToRouteAction ( array $action ) : array | ||
$action | array | |
Результат | array |
public createRoute ( array | Illuminate\Routing\Route $route ) : |
||
$route | array | Illuminate\Routing\Route | |
Результат |
public current ( ) : Illuminate\Routing\Route | ||
Результат | Illuminate\Routing\Route |
public currentRouteAction ( ) : string | null | ||
Результат | string | null |
public currentRouteName ( ) : string | null | ||
Результат | string | null |
public currentRouteNamed ( string $name ) : boolean | ||
$name | string | |
Результат | boolean |
public currentRouteUses ( string $action ) : boolean | ||
$action | string | |
Результат | boolean |
public dispatch ( Dingo\Api\Http\Request $request ) : |
||
$request | Dingo\Api\Http\Request | |
Результат |
public gatherRouteMiddlewares ( mixed $route ) : array | ||
$route | mixed | |
Результат | array |
public getAdapterRoutes ( ) : array | ||
Результат | array |
public getCurrentRequest ( ) : Dingo\Api\Http\Request | ||
Результат | Dingo\Api\Http\Request |
public getCurrentRoute ( ) : |
||
Результат |
public getLastGroupPrefix ( ) : string | ||
Результат | string |
public getRoutesDispatched ( ) : integer | ||
Результат | integer |
public hasDispatchedRoutes ( ) : boolean | ||
Результат | boolean |
public hasGroupStack ( ) : boolean | ||
Результат | boolean |
protected mergeLastGroupAttributes ( array $attributes ) : array | ||
$attributes | array | |
Результат | array |
protected prepareResponse ( mixed $response, Dingo\Api\Http\Request $request, string $format ) : |
||
$response | mixed | |
$request | Dingo\Api\Http\Request | |
$format | string | |
Результат |
protected requestIsConditional ( ) : boolean | ||
Результат | boolean |
public setAdapterRoutes ( array $routes ) : void | ||
$routes | array | |
Результат | void |
public setConditionalRequest ( boolean $conditionalRequest ) : void | ||
$conditionalRequest | boolean | |
Результат | void |
public setCurrentRoute ( |
||
$route | ||
Результат | void |
protected Accept,Dingo\Api\Http\Parser $accept | ||
Результат |
protected Adapter,Dingo\Api\Contract\Routing $adapter | ||
Результат | Dingo\Api\Contract\Routing\Adapter |
protected bool $conditionalRequest | ||
Результат | boolean |
protected Container,Illuminate\Container $container | ||
Результат | Illuminate\Container\Container |
protected Route,Dingo\Api\Routing $currentRoute | ||
Результат |
protected ExceptionHandler,Dingo\Api\Contract\Debug $exception | ||
Результат | Dingo\Api\Contract\Debug\ExceptionHandler |
protected int $routesDispatched | ||
Результат | integer |