\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

$app

$app

$config

$config

Methods

__construct()

__construct(\think\App  $app, array  $config = []) : mixed

Parameters

\think\App $app
array $config

Returns

mixed —

__make()

__make(\think\App  $app, \think\Config  $config) : mixed

Parameters

\think\App $app
\think\Config $config

Returns

mixed —

setConfig()

setConfig(array  $config) : mixed

Parameters

array $config

Returns

mixed —

import()

import(array  $middlewares = [], string  $type = 'route') : mixed

导入中间件

Parameters

array $middlewares
string $type

中间件类型

Returns

mixed —

add()

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

注册中间件

Parameters

mixed $middleware
string $type

中间件类型

Returns

mixed —

controller()

controller(mixed  $middleware) : mixed

注册控制器中间件

Parameters

mixed $middleware

Returns

mixed —

unshift()

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

移除中间件

Parameters

mixed $middleware
string $type

中间件类型

Returns

mixed —

all()

all(string  $type = 'route') : mixed

获取注册的中间件

Parameters

string $type

中间件类型

Returns

mixed —

clear()

clear() : mixed

清除中间件

Returns

mixed —

dispatch()

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

中间件调度

Parameters

\think\Request $request
string $type

中间件类型

Returns

mixed —

__debugInfo()

__debugInfo() : mixed

Returns

mixed —

buildMiddleware()

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

解析中间件

Parameters

mixed $middleware
string $type

中间件类型

Returns

mixed —

resolve()

resolve(mixed  $type = 'route') : mixed

Parameters

mixed $type

Returns

mixed —