1 | <?php |
||
8 | class GetParameterLocator |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var Request |
||
13 | */ |
||
14 | private $request; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $parameterName; |
||
20 | /** |
||
21 | * @var TenantRegistry |
||
22 | */ |
||
23 | private $registry; |
||
24 | |||
25 | /** |
||
26 | * @param Request $request |
||
27 | * @param string $parameterName |
||
28 | * @param TenantRegistry $registry |
||
29 | */ |
||
30 | public function __construct(Request $request, $parameterName, TenantRegistry $registry) |
||
36 | |||
37 | /** |
||
38 | * @throws \RuntimeException |
||
39 | * @throws \OutOfBoundsException |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getTenant() |
||
56 | |||
57 | /** |
||
58 | * @param Request $request |
||
59 | * @param string $parameterName |
||
60 | * @param TenantRegistry $registry |
||
61 | * |
||
62 | * @return mixed |
||
63 | */ |
||
64 | public static function getTenantFromRequest(Request $request, $parameterName = 'tenant', TenantRegistry $registry) |
||
70 | } |
||
71 |