0
0

Middleware.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. namespace think\facade;
  12. use think\Facade;
  13. /**
  14. * @see \think\Middleware
  15. * @mixin \think\Middleware
  16. * @method void import(array $middlewares = []) static 批量设置中间件
  17. * @method void add(mixed $middleware) static 添加中间件到队列
  18. * @method void unshift(mixed $middleware) static 添加中间件到队列开头
  19. * @method array all() static 获取中间件队列
  20. * @method \think\Response dispatch(\think\Request $request) static 执行中间件调度
  21. */
  22. class Middleware extends Facade
  23. {
  24. /**
  25. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  26. * @access protected
  27. * @return string
  28. */
  29. protected static function getFacadeClass()
  30. {
  31. return 'middleware';
  32. }
  33. }