PHP Class JasonLewis\EnhancedRouter\Router

Inheritance: extends Illuminate\Routing\Router
Afficher le fichier Open project: jasonlewis/enhanced-router Class Usage Examples

Protected Properties

Свойство Type Description
$httpVerbFilters array The HTTP verb to filter bindings.
$routeGroups array Array of route groups.

Méthodes publiques

Méthode Description
bunch ( Closure $callback ) : JasonLewis\EnhancedRouter\RouteGroup An alias of the group method but without the attributes.
dispatch ( Request $request ) : Response Get the response for a given request.
findPatternFilters ( string $method, string $path ) : array Find the patterned filters matching a request.
getRouteGroups ( ) : array Get the array of route groups.
getRoutes ( ) : RouteCollection Get the route collection instance.
group ( array $attributes, Closure $callback ) : JasonLewis\EnhancedRouter\RouteGroup Create a route group with shared attributes. Overloading this method allows developers to chain requirements and filters to all routes within the group.
on ( string | array $verbs, string | array $names ) : void Tie a registered middleware to an HTTP verb or verbs.

Méthodes protégées

Méthode Description
mergeGroupFilters ( Illuminate\Routing\Route $route, JasonLewis\EnhancedRouter\RouteGroup $group ) : void Merge a groups filters onto a route.
mergeRouteGroups ( ) : void Merge route groups into the core route collection.

Method Details

bunch() public méthode

An alias of the group method but without the attributes.
public bunch ( Closure $callback ) : JasonLewis\EnhancedRouter\RouteGroup
$callback Closure
Résultat JasonLewis\EnhancedRouter\RouteGroup

dispatch() public méthode

Overloaded so that we can merge route groups.
public dispatch ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

findPatternFilters() public méthode

Find the patterned filters matching a request.
public findPatternFilters ( string $method, string $path ) : array
$method string
$path string
Résultat array

getRouteGroups() public méthode

Get the array of route groups.
public getRouteGroups ( ) : array
Résultat array

getRoutes() public méthode

Overloaded so that we can merge route groups.
public getRoutes ( ) : RouteCollection
Résultat Symfony\Component\Routing\RouteCollection

group() public méthode

Create a route group with shared attributes. Overloading this method allows developers to chain requirements and filters to all routes within the group.
public group ( array $attributes, Closure $callback ) : JasonLewis\EnhancedRouter\RouteGroup
$attributes array
$callback Closure
Résultat JasonLewis\EnhancedRouter\RouteGroup

mergeGroupFilters() protected méthode

Merge a groups filters onto a route.
protected mergeGroupFilters ( Illuminate\Routing\Route $route, JasonLewis\EnhancedRouter\RouteGroup $group ) : void
$route Illuminate\Routing\Route
$group JasonLewis\EnhancedRouter\RouteGroup
Résultat void

mergeRouteGroups() protected méthode

Merge route groups into the core route collection.
protected mergeRouteGroups ( ) : void
Résultat void

on() public méthode

Tie a registered middleware to an HTTP verb or verbs.
public on ( string | array $verbs, string | array $names ) : void
$verbs string | array
$names string | array
Résultat void

Property Details

$httpVerbFilters protected_oe property

The HTTP verb to filter bindings.
protected array $httpVerbFilters
Résultat array

$routeGroups protected_oe property

Array of route groups.
protected array $routeGroups
Résultat array