1 | <?php |
||
11 | abstract class AbstractController |
||
12 | { |
||
13 | /** |
||
14 | * @var Twig |
||
15 | */ |
||
16 | protected $twig; |
||
17 | |||
18 | /** |
||
19 | * @var RouterInterface |
||
20 | */ |
||
21 | protected $router; |
||
22 | |||
23 | /** |
||
24 | * @var Session |
||
25 | */ |
||
26 | protected $session; |
||
27 | |||
28 | /** |
||
29 | * Pseudo constructor to use by decorator. |
||
30 | * |
||
31 | * @param Twig $twig |
||
32 | * @param RouterInterface $router |
||
33 | * @param Session $session |
||
34 | */ |
||
35 | 2 | public function pseudoConstructor(Twig $twig, RouterInterface $router, Session $session): void |
|
41 | |||
42 | /** |
||
43 | * Adds given value to the flashed variables bag. |
||
44 | * |
||
45 | * @param string $name |
||
46 | * @param $value |
||
47 | */ |
||
48 | protected function flash(string $name, $value): void |
||
52 | |||
53 | /** |
||
54 | * Returns flashed value with given name. |
||
55 | * |
||
56 | * @param string $name |
||
57 | * |
||
58 | * @return mixed|null |
||
59 | */ |
||
60 | protected function getFlash(string $name) |
||
70 | } |
||
71 |