1 | <?php |
||
13 | class DetectDevice |
||
14 | { |
||
15 | use Utils\AttributeTrait; |
||
16 | |||
17 | const KEY = 'DEVICE'; |
||
18 | |||
19 | /** |
||
20 | * Returns the device. |
||
21 | * |
||
22 | * @param ServerRequestInterface $request |
||
23 | * |
||
24 | * @return Mobile_Detect|null |
||
25 | */ |
||
26 | public static function getDevice(ServerRequestInterface $request) |
||
30 | |||
31 | /** |
||
32 | * Execute the middleware. |
||
33 | * |
||
34 | * @param ServerRequestInterface $request |
||
35 | * @param ResponseInterface $response |
||
36 | * @param callable $next |
||
37 | * |
||
38 | * @return ResponseInterface |
||
39 | */ |
||
40 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
46 | } |
||
47 |