1 | <?php |
||
7 | class HeaderLocator implements TenantLocator |
||
8 | { |
||
9 | private $request; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $headerKey; |
||
15 | |||
16 | public function __construct(Request $request, $headerKey) |
||
21 | |||
22 | /** |
||
23 | * @return string Tenant key |
||
24 | */ |
||
25 | public function getTenant() |
||
33 | |||
34 | /** |
||
35 | * @param Request $request |
||
36 | * @param string $headerKey |
||
37 | * @return string Tenant key |
||
38 | */ |
||
39 | public static function getTenantFromRequest(Request $request, $headerKey = 'tenant') |
||
45 | } |
||
46 |