1 | <?php |
||
21 | final class AuthErrorAction |
||
22 | { |
||
23 | /** |
||
24 | * @var Environment |
||
25 | */ |
||
26 | private $twig; |
||
27 | |||
28 | /** |
||
29 | * @var RouterInterface |
||
30 | */ |
||
31 | private $router; |
||
32 | |||
33 | /** |
||
34 | * @var SessionManager |
||
35 | */ |
||
36 | private $sessionManager; |
||
37 | |||
38 | /** |
||
39 | * @var string|null |
||
40 | */ |
||
41 | private $redirectRoute; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | private $redirectRouteParams; |
||
47 | |||
48 | /** |
||
49 | * AuthErrorAction constructor. |
||
50 | * |
||
51 | * @param Environment $twig |
||
52 | * @param RouterInterface $router |
||
53 | * @param SessionManager $sessionManager |
||
54 | * @param null|string $redirectRoute |
||
55 | * @param array $redirectRouteParams |
||
56 | */ |
||
57 | public function __construct( |
||
70 | |||
71 | /** |
||
72 | * @throws \Twig_Error_Loader |
||
73 | * @throws \Twig_Error_Runtime |
||
74 | * @throws \Twig_Error_Syntax |
||
75 | * |
||
76 | * @return Response |
||
77 | */ |
||
78 | public function __invoke(): Response |
||
90 | |||
91 | /** |
||
92 | * Returns a RedirectResponse to the given route with the given parameters. |
||
93 | * |
||
94 | * @param string $route The name of the route |
||
95 | * @param array $parameters An array of parameters |
||
96 | * @param int $status The status code to use for the Response |
||
97 | * |
||
98 | * @return RedirectResponse |
||
99 | */ |
||
100 | private function redirectToRoute($route, array $parameters = [], $status = 302): RedirectResponse |
||
104 | |||
105 | /** |
||
106 | * Generates a URL from the given parameters. |
||
107 | * |
||
108 | * @param string $route The name of the route |
||
109 | * @param array $parameters An array of parameters |
||
110 | * @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface) |
||
111 | * |
||
112 | * @return string The generated URL |
||
113 | */ |
||
114 | private function generateUrl($route, array $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string |
||
118 | } |
||
119 |