Lines
0.00%
0 / 15
Functions and Methods
0.00%
0 / 1
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 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 \Psr\Http\Message\ResponseInterface | |
| 22 | */ | |
| 23 | #[\Override] | |
| 24 | public function readResponse( | |
| 25 | \Psr\Http\Message\RequestInterface $request, | |
| 26 | \Psr\Http\Message\ResponseInterface $response, | |
| 27 | array $args | |
| 28 | ) { | |
| 29 | $status['homeurl'] = Home::getHomeUrl($request); | |
| 30 | $status['hash'] = Helper::getHashFromRequest($request); | |
| 31 | if ($status['hash']) { | |
| 32 | $status['ticketprinter'] = \App::$http | |
| 33 | ->readGetResult('/ticketprinter/' . $status['hash'] . '/') | |
| 34 | ->getEntity(); | |
| 35 | } | |
| 36 | ||
| 37 | return \BO\Slim\Render::withHtml( | |
| 38 | $response, | |
| 39 | 'page/status.twig', | |
| 40 | array( | |
| 41 | 'title' => 'Status des Ticketprinter', | |
| 42 | 'status' => $status, | |
| 43 | 'cookies' => $request->getCookieParams() | |
| 44 | ) | |
| 45 | ); | |
| 46 | } | |
| 47 | } |