1 | <?php |
||
14 | class Middleware |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * CodeIgniter instance (in dynamic context) |
||
19 | * |
||
20 | * @var $CI |
||
21 | * |
||
22 | * @access protected |
||
23 | */ |
||
24 | protected $CI; |
||
25 | |||
26 | /** |
||
27 | * CodeIgniter instance (in static context) |
||
28 | * |
||
29 | * @var static $instance |
||
30 | * |
||
31 | * @access protected |
||
32 | */ |
||
33 | protected static $instance; |
||
34 | |||
35 | /** |
||
36 | * Current URI string |
||
37 | * |
||
38 | * @var static $uri_string |
||
39 | * |
||
40 | * @access protected |
||
41 | */ |
||
42 | protected static $uri_string; |
||
43 | |||
44 | /** |
||
45 | * Class constructor |
||
46 | * |
||
47 | * @return void |
||
|
|||
48 | * |
||
49 | * @access public |
||
50 | */ |
||
51 | public function __construct() |
||
55 | |||
56 | /** |
||
57 | * Class initialization (in static context) |
||
58 | * |
||
59 | * @return void |
||
60 | * |
||
61 | * @access public |
||
62 | * @static |
||
63 | */ |
||
64 | public static function init() |
||
79 | |||
80 | /** |
||
81 | * Executes the current route middleware (if any) |
||
82 | * |
||
83 | * @return void |
||
84 | * |
||
85 | * @access public |
||
86 | * @static |
||
87 | */ |
||
88 | public static function routeMiddleware() |
||
109 | |||
110 | /** |
||
111 | * Run middleware |
||
112 | * |
||
113 | * @param string $middlewareName |
||
114 | * |
||
115 | * @return void |
||
116 | * |
||
117 | * @access private |
||
118 | * @static |
||
119 | */ |
||
120 | private static function runMiddleware($middlewareName) |
||
155 | } |
||
156 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.