PHP Class Dingo\Api\Console\Command\Routes

Inheritance: extends Illuminate\Foundation\Console\RouteListCommand
显示文件 Open project: dingo/api

Protected Properties

Property Type Description
$description string The console command description.
$headers array The table headers for the command.
$name string The console command name.
$router Dingo\Api\Routing\Router Dingo router instance.
$routes array Array of route collections.

Public Methods

Method Description
__construct ( Router $router ) : void Create a new routes command instance.
fire ( ) : void Execute the console command.

Protected Methods

Method Description
filterByName ( array $route ) : boolean Filter the route by its name.
filterByPath ( array $route ) : boolean Filter the route by its path.
filterByProtected ( array $route ) : boolean Filter the route by whether or not it is protected.
filterByScopes ( array $route ) : boolean Filter the route by its scopes.
filterByUnprotected ( array $route ) : boolean Filter the route by whether or not it is unprotected.
filterByVersions ( array $route ) : boolean Filter the route by its versions.
filterRoute ( array $route ) : array | null Filter the route by URI, Version, Scopes and / or name.
getOptions ( ) : array Get the console command options.
getRoutes ( ) : array Compile the routes into a displayable format.
routeRateLimit ( Route $route ) : null | string Display the routes rate limiting requests per second. This takes the limit and divides it by the expiration time in seconds to give you a rough idea of how many requests you'd be able to fire off per second on the route.

Method Details

__construct() public method

Create a new routes command instance.
public __construct ( Router $router ) : void
$router Dingo\Api\Routing\Router
return void

filterByName() protected method

Filter the route by its name.
protected filterByName ( array $route ) : boolean
$route array
return boolean

filterByPath() protected method

Filter the route by its path.
protected filterByPath ( array $route ) : boolean
$route array
return boolean

filterByProtected() protected method

Filter the route by whether or not it is protected.
protected filterByProtected ( array $route ) : boolean
$route array
return boolean

filterByScopes() protected method

Filter the route by its scopes.
protected filterByScopes ( array $route ) : boolean
$route array
return boolean

filterByUnprotected() protected method

Filter the route by whether or not it is unprotected.
protected filterByUnprotected ( array $route ) : boolean
$route array
return boolean

filterByVersions() protected method

Filter the route by its versions.
protected filterByVersions ( array $route ) : boolean
$route array
return boolean

filterRoute() protected method

Filter the route by URI, Version, Scopes and / or name.
protected filterRoute ( array $route ) : array | null
$route array
return array | null

fire() public method

Execute the console command.
public fire ( ) : void
return void

getOptions() protected method

Get the console command options.
protected getOptions ( ) : array
return array

getRoutes() protected method

Compile the routes into a displayable format.
protected getRoutes ( ) : array
return array

routeRateLimit() protected method

Display the routes rate limiting requests per second. This takes the limit and divides it by the expiration time in seconds to give you a rough idea of how many requests you'd be able to fire off per second on the route.
protected routeRateLimit ( Route $route ) : null | string
$route Dingo\Api\Routing\Route
return null | string

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$headers protected_oe property

The table headers for the command.
protected array $headers
return array

$name protected_oe property

The console command name.
protected string $name
return string

$router protected_oe property

Dingo router instance.
protected Router,Dingo\Api\Routing $router
return Dingo\Api\Routing\Router

$routes protected_oe property

Array of route collections.
protected array $routes
return array