\thinkMiddleware

Summary

Methods
Properties
Constants
__construct()
__make()
setConfig()
import()
add()
controller()
unshift()
all()
clear()
dispatch()
__debugInfo()
No public properties found
No constants found
buildMiddleware()
resolve()
$queue
$app
$config
N/A
No private methods found
No private properties found
N/A

Properties

$queue

$queue : 

Type

$app

$app : 

Type

$config

$config : 

Type

Methods

__construct()

__construct(\think\App  $app, array  $config = array()) 

Parameters

\think\App $app
array $config

setConfig()

setConfig(array  $config) 

Parameters

array $config

import()

import(array  $middlewares = array(), string  $type = 'route') 

导入中间件

Parameters

array $middlewares
string $type

中间件类型

add()

add(mixed  $middleware, string  $type = 'route') 

注册中间件

Parameters

mixed $middleware
string $type

中间件类型

controller()

controller(mixed  $middleware) 

注册控制器中间件

Parameters

mixed $middleware

unshift()

unshift(mixed  $middleware, string  $type = 'route') 

移除中间件

Parameters

mixed $middleware
string $type

中间件类型

all()

all(string  $type = 'route') 

获取注册的中间件

Parameters

string $type

中间件类型

clear()

clear() 

清除中间件

dispatch()

dispatch(\think\Request  $request, string  $type = 'route') 

中间件调度

Parameters

\think\Request $request
string $type

中间件类型

__debugInfo()

__debugInfo() 

buildMiddleware()

buildMiddleware(mixed  $middleware, string  $type = 'route') 

解析中间件

Parameters

mixed $middleware
string $type

中间件类型

resolve()

resolve(  $type = 'route') 

Parameters

$type