@@ -23,34 +23,34 @@ discard block |
||
23 | 23 | |
24 | 24 | private function _getSubdomains() { |
25 | 25 | |
26 | - $validConfiguration = Configure::check('Multidimensional/Subdomains.subdomains'); |
|
26 | + $validConfiguration = Configure::check('Multidimensional/Subdomains.subdomains'); |
|
27 | 27 | |
28 | - if (!$validConfiguration) { |
|
28 | + if (!$validConfiguration) { |
|
29 | 29 | return []; |
30 | 30 | } |
31 | 31 | |
32 | - $subdomains = Configure::read('Multidimensional/Subdomains.subdomains'); |
|
32 | + $subdomains = Configure::read('Multidimensional/Subdomains.subdomains'); |
|
33 | 33 | |
34 | - if (!is_array($subdomains) || count($subdomains) == 0) { |
|
34 | + if (!is_array($subdomains) || count($subdomains) == 0) { |
|
35 | 35 | return []; |
36 | 36 | } |
37 | 37 | |
38 | - return $subdomains; |
|
38 | + return $subdomains; |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
42 | 42 | private function _getPrefixAndHost (array $context = []) { |
43 | 43 | |
44 | - if (empty($context['_host'])) { |
|
44 | + if (empty($context['_host'])) { |
|
45 | 45 | $request = Router::getRequest(true) ?: Request::createFromGlobals(); |
46 | 46 | $host = $request->host(); |
47 | 47 | } else { |
48 | 48 | $host = $context['_host']; |
49 | 49 | } |
50 | 50 | |
51 | - $parts = explode('.', $host, 2); |
|
51 | + $parts = explode('.', $host, 2); |
|
52 | 52 | |
53 | - if (in_array($parts[0], $this->_getSubdomains())) { |
|
53 | + if (in_array($parts[0], $this->_getSubdomains())) { |
|
54 | 54 | return $parts; |
55 | 55 | } else { |
56 | 56 | return [false, $host]; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function parse ($url, $method = '') { |
69 | 69 | |
70 | - debug("HELLO?"); |
|
70 | + debug("HELLO?"); |
|
71 | 71 | |
72 | 72 | list($prefix) = $this->_getPrefixAndHost(); |
73 | 73 |
@@ -20,6 +20,6 @@ |
||
20 | 20 | |
21 | 21 | class Route extends CakeRoute { |
22 | 22 | |
23 | - use SubdomainRouteTrait; |
|
23 | + use SubdomainRouteTrait; |
|
24 | 24 | |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -20,6 +20,6 @@ |
||
20 | 20 | |
21 | 21 | class InflectedRoute extends CakeInflectedRoute { |
22 | 22 | |
23 | - use SubdomainRouteTrait; |
|
23 | + use SubdomainRouteTrait; |
|
24 | 24 | |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -20,6 +20,6 @@ |
||
20 | 20 | |
21 | 21 | class DashedRoute extends CakeDashedRoute { |
22 | 22 | |
23 | - use SubdomainRouteTrait; |
|
23 | + use SubdomainRouteTrait; |
|
24 | 24 | |
25 | 25 | } |
26 | 26 | \ No newline at end of file |