PHP Класс Route, someline-starter

User: florianauderset Date: 09.12.15 Time: 13:47
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
any ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new route responding to all verbs.
auth ( ) : void Register the typical authentication routes for an application.
bind ( string $key, string | callable $binder ) : void Add a new route parameter binder.
controller ( string $uri, string $controller, array $names = [] ) : void Route a controller to a URI with wildcard routing.
controllers ( array $controllers ) : void Register an array of controllers with wildcard routing.
createClassBinding ( string $binding ) : Closure Create a class based binding using the IoC container.
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, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new DELETE route with the router.
dispatch ( Illuminate\Http\Request $request ) : Illuminate\Http\Response Dispatch the request to the application.
dispatchToRoute ( Illuminate\Http\Request $request ) : mixed Dispatch the request to a route and return the response.
gatherRouteMiddlewares ( Illuminate\Routing\Route $route ) : array Gather the middleware for the given route.
get ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new GET route with the router.
getCurrentRequest ( ) : Illuminate\Http\Request Get the request currently being dispatched.
getCurrentRoute ( ) : Illuminate\Routing\Route Get the currently dispatched route instance.
getGroupStack ( ) : array Get the current group stack for the router.
getLastGroupPrefix ( ) : string Get the prefix from the last group on the stack.
getMiddleware ( ) : array Get all of the defined middleware short-hand names.
getPatterns ( ) : array Get the global "where" patterns.
getRoutes ( ) : Illuminate\Routing\RouteCollection Get the underlying route collection.
group ( array $attributes, Closure $callback ) : void Create a route group with shared attributes.
has ( string $name ) : boolean Check if a route with the given name exists.
hasGroupStack ( ) : boolean Determine if the router currently has a group stack.
hasMacro ( string $name ) : boolean Checks if macro is registered.
input ( string $key, string $default = null ) : mixed Get a route parameter for the current route.
is ( ) : boolean Alias for the "currentRouteName" method.
macro ( string $name, callable $macro ) : void Register a custom macro.
match ( array | string $methods, string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new route with the given verbs.
matched ( string | callable $callback ) : void Register a route matched event listener.
mergeGroup ( array $new, array $old ) : array Merge the given group attributes.
mergeWithLastGroup ( array $new ) : array Merge the given array with the last group stack.
middleware ( string $name, string $class ) Register a short-hand name for a middleware.
middlewareGroup ( string $name, array $middleware ) Register a group of middleware.
model ( string $key, string $class, Closure | null $callback = null ) : void Register a model binder for a wildcard.
options ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new OPTIONS route with the router.
patch ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new PATCH route with the router.
pattern ( string $key, string $pattern ) : void Set a global where pattern on all routes.
patterns ( array $patterns ) : void Set a group of global where patterns on all routes.
post ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new POST route with the router.
prepareResponse ( Request $request, mixed $response ) : Illuminate\Http\Response Create a response instance from the given value.
prependMiddlewareToGroup ( string $group, string $middleware ) Add a middleware to the beginning of a middleware group.
pushMiddlewareToGroup ( string $group, string $middleware ) Add a middleware to the end of a middleware group.
put ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route Register a new PUT route with the router.
resolveMiddlewareClassName ( string $name ) : string | array Resolve the middleware name to a class name(s) preserving passed parameters.
resource ( string $name, string $controller, array $options = [] ) : void Route a resource to a controller.
resourceParameters ( array $parameters = [] ) : void Set the global resource parameter mapping.
resources ( array $resources ) : void Register an array of resource controllers.
setRoutes ( Illuminate\Routing\RouteCollection $routes ) : void Set the route collection instance.
singularResourceParameters ( ) : void Set the unmapped global resource parameters to singular.
uses ( ) : boolean Alias for the "currentRouteUses" method.

Описание методов

any() публичный статический Метод

Register a new route responding to all verbs.
public static any ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

auth() публичный статический Метод

Register the typical authentication routes for an application.
public static auth ( ) : void
Результат void

bind() публичный статический Метод

Add a new route parameter binder.
public static bind ( string $key, string | callable $binder ) : void
$key string
$binder string | callable
Результат void

controller() публичный статический Метод

Route a controller to a URI with wildcard routing.
Устаревший: since version 5.2.
public static controller ( string $uri, string $controller, array $names = [] ) : void
$uri string
$controller string
$names array
Результат void

controllers() публичный статический Метод

Register an array of controllers with wildcard routing.
Устаревший: since version 5.2.
public static controllers ( array $controllers ) : void
$controllers array
Результат void

createClassBinding() публичный статический Метод

Create a class based binding using the IoC container.
public static createClassBinding ( string $binding ) : Closure
$binding string
Результат Closure

current() публичный статический Метод

Get the currently dispatched route instance.
public static current ( ) : Illuminate\Routing\Route
Результат Illuminate\Routing\Route

currentRouteAction() публичный статический Метод

Get the current route action.
public static currentRouteAction ( ) : string | null
Результат string | null

currentRouteName() публичный статический Метод

Get the current route name.
public static currentRouteName ( ) : string | null
Результат string | null

currentRouteNamed() публичный статический Метод

Determine if the current route matches a given name.
public static currentRouteNamed ( string $name ) : boolean
$name string
Результат boolean

currentRouteUses() публичный статический Метод

Determine if the current route action matches a given action.
public static currentRouteUses ( string $action ) : boolean
$action string
Результат boolean

delete() публичный статический Метод

Register a new DELETE route with the router.
public static delete ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

dispatch() публичный статический Метод

Dispatch the request to the application.
public static dispatch ( Illuminate\Http\Request $request ) : Illuminate\Http\Response
$request Illuminate\Http\Request
Результат Illuminate\Http\Response

dispatchToRoute() публичный статический Метод

Dispatch the request to a route and return the response.
public static dispatchToRoute ( Illuminate\Http\Request $request ) : mixed
$request Illuminate\Http\Request
Результат mixed

gatherRouteMiddlewares() публичный статический Метод

Gather the middleware for the given route.
public static gatherRouteMiddlewares ( Illuminate\Routing\Route $route ) : array
$route Illuminate\Routing\Route
Результат array

get() публичный статический Метод

Register a new GET route with the router.
public static get ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

getCurrentRequest() публичный статический Метод

Get the request currently being dispatched.
public static getCurrentRequest ( ) : Illuminate\Http\Request
Результат Illuminate\Http\Request

getCurrentRoute() публичный статический Метод

Get the currently dispatched route instance.
public static getCurrentRoute ( ) : Illuminate\Routing\Route
Результат Illuminate\Routing\Route

getGroupStack() публичный статический Метод

Get the current group stack for the router.
public static getGroupStack ( ) : array
Результат array

getLastGroupPrefix() публичный статический Метод

Get the prefix from the last group on the stack.
public static getLastGroupPrefix ( ) : string
Результат string

getMiddleware() публичный статический Метод

Get all of the defined middleware short-hand names.
public static getMiddleware ( ) : array
Результат array

getPatterns() публичный статический Метод

Get the global "where" patterns.
public static getPatterns ( ) : array
Результат array

getRoutes() публичный статический Метод

Get the underlying route collection.
public static getRoutes ( ) : Illuminate\Routing\RouteCollection
Результат Illuminate\Routing\RouteCollection

group() публичный статический Метод

Create a route group with shared attributes.
public static group ( array $attributes, Closure $callback ) : void
$attributes array
$callback Closure
Результат void

has() публичный статический Метод

Check if a route with the given name exists.
public static has ( string $name ) : boolean
$name string
Результат boolean

hasGroupStack() публичный статический Метод

Determine if the router currently has a group stack.
public static hasGroupStack ( ) : boolean
Результат boolean

hasMacro() публичный статический Метод

Checks if macro is registered.
public static hasMacro ( string $name ) : boolean
$name string
Результат boolean

input() публичный статический Метод

Get a route parameter for the current route.
public static input ( string $key, string $default = null ) : mixed
$key string
$default string
Результат mixed

is() публичный статический Метод

Alias for the "currentRouteName" method.
public static is ( ) : boolean
Результат boolean

macro() публичный статический Метод

Register a custom macro.
public static macro ( string $name, callable $macro ) : void
$name string
$macro callable
Результат void

match() публичный статический Метод

Register a new route with the given verbs.
public static match ( array | string $methods, string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$methods array | string
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

matched() публичный статический Метод

Register a route matched event listener.
public static matched ( string | callable $callback ) : void
$callback string | callable
Результат void

mergeGroup() публичный статический Метод

Merge the given group attributes.
public static mergeGroup ( array $new, array $old ) : array
$new array
$old array
Результат array

mergeWithLastGroup() публичный статический Метод

Merge the given array with the last group stack.
public static mergeWithLastGroup ( array $new ) : array
$new array
Результат array

middleware() публичный статический Метод

Register a short-hand name for a middleware.
public static middleware ( string $name, string $class )
$name string
$class string

middlewareGroup() публичный статический Метод

Register a group of middleware.
public static middlewareGroup ( string $name, array $middleware )
$name string
$middleware array

model() публичный статический Метод

Register a model binder for a wildcard.
public static model ( string $key, string $class, Closure | null $callback = null ) : void
$key string
$class string
$callback Closure | null
Результат void

options() публичный статический Метод

Register a new OPTIONS route with the router.
public static options ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

patch() публичный статический Метод

Register a new PATCH route with the router.
public static patch ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

pattern() публичный статический Метод

Set a global where pattern on all routes.
public static pattern ( string $key, string $pattern ) : void
$key string
$pattern string
Результат void

patterns() публичный статический Метод

Set a group of global where patterns on all routes.
public static patterns ( array $patterns ) : void
$patterns array
Результат void

post() публичный статический Метод

Register a new POST route with the router.
public static post ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

prepareResponse() публичный статический Метод

Create a response instance from the given value.
public static prepareResponse ( Request $request, mixed $response ) : Illuminate\Http\Response
$request Symfony\Component\HttpFoundation\Request
$response mixed
Результат Illuminate\Http\Response

prependMiddlewareToGroup() публичный статический Метод

If the middleware is already in the group, it will not be added again.
public static prependMiddlewareToGroup ( string $group, string $middleware )
$group string
$middleware string

pushMiddlewareToGroup() публичный статический Метод

If the middleware is already in the group, it will not be added again.
public static pushMiddlewareToGroup ( string $group, string $middleware )
$group string
$middleware string

put() публичный статический Метод

Register a new PUT route with the router.
public static put ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
Результат Illuminate\Routing\Route

resolveMiddlewareClassName() публичный статический Метод

Resolve the middleware name to a class name(s) preserving passed parameters.
public static resolveMiddlewareClassName ( string $name ) : string | array
$name string
Результат string | array

resource() публичный статический Метод

Route a resource to a controller.
public static resource ( string $name, string $controller, array $options = [] ) : void
$name string
$controller string
$options array
Результат void

resourceParameters() публичный статический Метод

Set the global resource parameter mapping.
public static resourceParameters ( array $parameters = [] ) : void
$parameters array
Результат void

resources() публичный статический Метод

Register an array of resource controllers.
public static resources ( array $resources ) : void
$resources array
Результат void

setRoutes() публичный статический Метод

Set the route collection instance.
public static setRoutes ( Illuminate\Routing\RouteCollection $routes ) : void
$routes Illuminate\Routing\RouteCollection
Результат void

singularResourceParameters() публичный статический Метод

Set the unmapped global resource parameters to singular.
public static singularResourceParameters ( ) : void
Результат void

uses() публичный статический Метод

Alias for the "currentRouteUses" method.
public static uses ( ) : boolean
Результат boolean