PHP 클래스 SebastiaanLuca\Router\ExtendedRouter

An extension to the application's router to provide extra functionality.
상속: extends Illuminate\Routing\Router, implements Illuminate\Contracts\Routing\Registrar
파일 보기 프로젝트 열기: sebastiaanluca/laravel-router

보호된 프로퍼티들

프로퍼티 타입 설명
$isBootstrapped boolean Indicates if all the service providers have been loaded.
$routeMiddleware array The registered middleware for named routes.

공개 메소드들

메소드 설명
__construct ( Illuminate\Contracts\Events\Dispatcher $events, Illuminate\Container\Container $container = null ) Create a new Router instance.
linkNamedRouteMiddleware ( ) Link all registered middleware to the corresponding routes.
registerNamedRouteMiddleware ( string | array $routes, string | array $middleware ) Register middleware to add to a named route.

보호된 메소드들

메소드 설명
addMiddlewareToRoute ( string $name, array $middleware ) Add middleware to a named route.

메소드 상세

__construct() 공개 메소드

Create a new Router instance.
public __construct ( Illuminate\Contracts\Events\Dispatcher $events, Illuminate\Container\Container $container = null )
$events Illuminate\Contracts\Events\Dispatcher
$container Illuminate\Container\Container

addMiddlewareToRoute() 보호된 메소드

Optionally handles wildcard named routes.
protected addMiddlewareToRoute ( string $name, array $middleware )
$name string
$middleware array

linkNamedRouteMiddleware() 공개 메소드

The call to this method is delayed until all service providers have been registered and booted. This way all routes are defined before we try to apply any middleware.

registerNamedRouteMiddleware() 공개 메소드

AKA Route::when() but for middleware. Use an asterisk (*) for wildcard entries. E.g. users.* filters all user routes.
public registerNamedRouteMiddleware ( string | array $routes, string | array $middleware )
$routes string | array
$middleware string | array

프로퍼티 상세

$isBootstrapped 보호되어 있는 프로퍼티

Indicates if all the service providers have been loaded.
protected bool $isBootstrapped
리턴 boolean

$routeMiddleware 보호되어 있는 프로퍼티

The registered middleware for named routes.
protected array $routeMiddleware
리턴 array