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