1 | <?php |
||
14 | class InitStateMiddleware implements HTTPMiddleware |
||
15 | { |
||
16 | use Configurable; |
||
17 | |||
18 | /** |
||
19 | * URL paths that should be considered as admin only, i.e. not frontend |
||
20 | * |
||
21 | * @config |
||
22 | * @var array |
||
23 | */ |
||
24 | private static $admin_url_paths = [ |
||
|
|||
25 | 'dev/', |
||
26 | 'graphql/', |
||
27 | ]; |
||
28 | |||
29 | public function process(HTTPRequest $request, callable $delegate) |
||
54 | |||
55 | /** |
||
56 | * Determine whether the website is being viewed from an admin protected area or not |
||
57 | * |
||
58 | * @param HTTPRequest $request |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function getIsAdmin(HTTPRequest $request) |
||
73 | |||
74 | /** |
||
75 | * Use the given request to detect the current subsite ID |
||
76 | * |
||
77 | * @param HTTPRequest $request |
||
78 | * @return int |
||
79 | */ |
||
80 | protected function detectSubsiteId(HTTPRequest $request) |
||
98 | } |
||
99 |
This check marks private properties in classes that are never used. Those properties can be removed.