Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function getTenant() { |
||
24 | // Get the server name |
||
25 | $host = $this->request->getHost(); |
||
26 | |||
27 | if (!preg_match( $this->pattern, $host, $matches )) { |
||
28 | throw new \RuntimeException(sprintf('Could not match tenant for host "%s"', $host)); |
||
29 | } |
||
30 | |||
31 | return $matches['tenant']; |
||
32 | } |
||
33 | |||
64 |