Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function onPostExecute(Context $context) |
||
40 | { |
||
41 | $previousStack = $context->getPrevious(); |
||
42 | $previousStackSize = count($previousStack); |
||
43 | |||
44 | if ($previousStackSize > 1) { |
||
45 | return; |
||
46 | } |
||
47 | |||
48 | if (null === $context->getException()) { |
||
49 | return; |
||
50 | } |
||
51 | |||
52 | $renderTemplate = new RenderTemplate($this->templateName); |
||
53 | $context->getGateway()->execute($renderTemplate); |
||
54 | |||
55 | throw new HttpResponse(new Response($renderTemplate->getResult(), 200)); |
||
56 | } |
||
57 | } |
||
58 |