1 | <?php |
||
22 | final class CheckAuthAction |
||
23 | { |
||
24 | /** |
||
25 | * @var RouterInterface |
||
26 | */ |
||
27 | private $router; |
||
28 | |||
29 | /** |
||
30 | * @var SessionManager |
||
31 | */ |
||
32 | private $sessionManager; |
||
33 | |||
34 | /** |
||
35 | * @var AuthService |
||
36 | */ |
||
37 | private $authService; |
||
38 | |||
39 | /** |
||
40 | * CheckAuthAction constructor. |
||
41 | * |
||
42 | * @param RouterInterface $router |
||
43 | * @param SessionManager $sessionManager |
||
44 | * @param AuthService $authService |
||
45 | */ |
||
46 | public function __construct(RouterInterface $router, SessionManager $sessionManager, AuthService $authService) |
||
52 | |||
53 | /** |
||
54 | * @param Request $request |
||
55 | * |
||
56 | * @return Response |
||
57 | */ |
||
58 | public function __invoke(Request $request): Response |
||
77 | |||
78 | /** |
||
79 | * Returns a RedirectResponse to the given route with the given parameters. |
||
80 | * |
||
81 | * @param string $route The name of the route |
||
82 | * @param array $parameters An array of parameters |
||
83 | * @param int $status The status code to use for the Response |
||
84 | * |
||
85 | * @return RedirectResponse |
||
86 | */ |
||
87 | private function redirectToRoute($route, array $parameters = [], $status = 302): RedirectResponse |
||
91 | |||
92 | /** |
||
93 | * Generates a URL from the given parameters. |
||
94 | * |
||
95 | * @param string $route The name of the route |
||
96 | * @param array $parameters An array of parameters |
||
97 | * @param int $referenceType The type of reference (one of the constants in UrlGeneratorInterface) |
||
98 | * |
||
99 | * @return string The generated URL |
||
100 | */ |
||
101 | private function generateUrl($route, array $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string |
||
105 | } |
||
106 |