Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
Status | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
readResponse | |
0.00% |
0 / 15 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | /** |
4 | * |
5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
6 | * |
7 | */ |
8 | |
9 | namespace BO\Zmsticketprinter; |
10 | |
11 | use BO\Zmsticketprinter\Home; |
12 | use BO\Zmsticketprinter\Helper\Ticketprinter as Helper; |
13 | |
14 | /** |
15 | * Handle requests concerning services |
16 | */ |
17 | class Status extends BaseController |
18 | { |
19 | /** |
20 | * @SuppressWarnings(UnusedFormalParameter) |
21 | * @return String |
22 | */ |
23 | public function readResponse( |
24 | \Psr\Http\Message\RequestInterface $request, |
25 | \Psr\Http\Message\ResponseInterface $response, |
26 | array $args |
27 | ) { |
28 | $status['homeurl'] = Home::getHomeUrl($request); |
29 | $status['hash'] = Helper::getHashFromRequest($request); |
30 | if ($status['hash']) { |
31 | $status['ticketprinter'] = \App::$http |
32 | ->readGetResult('/ticketprinter/' . $status['hash'] . '/') |
33 | ->getEntity(); |
34 | } |
35 | |
36 | return \BO\Slim\Render::withHtml( |
37 | $response, |
38 | 'page/status.twig', |
39 | array( |
40 | 'title' => 'Status des Ticketprinter', |
41 | 'status' => $status, |
42 | 'cookies' => $request->getCookieParams() |
43 | ) |
44 | ); |
45 | } |
46 | } |