1 | <?php |
||
11 | class CountryURLProvider extends Object implements CountryURLProviderInterface |
||
|
|||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private static $locale_get_parameter = 'ecomlocale'; |
||
17 | |||
18 | /** |
||
19 | * returns the selected country code if there is one ... |
||
20 | * as an uppercase code, e.g. NZ |
||
21 | * @param string|null $url |
||
22 | * |
||
23 | * @return bool |
||
24 | */ |
||
25 | public function hasCountrySegment($url = '') |
||
29 | |||
30 | /** |
||
31 | * returns the selected country code if there is onCurrentCountrySegmente ... |
||
32 | * as an uppercase code, e.g. NZ |
||
33 | * @param string|null $url |
||
34 | * @param bool $includeGetVariable |
||
35 | * |
||
36 | * @return string|null |
||
37 | */ |
||
38 | public function CurrentCountrySegment($url = '', $includeGetVariable = true) |
||
64 | |||
65 | |||
66 | /** |
||
67 | * replaces a country code in a URL with another one |
||
68 | * |
||
69 | * @param string $newCountryCode e.g. NZ / nz |
||
70 | * @param string $url |
||
71 | * |
||
72 | * @return string|null only returns a string if it is different from the original! |
||
73 | */ |
||
74 | public function replaceCountryCodeInUrl($newCountryCode, $url = '') |
||
111 | |||
112 | /** |
||
113 | * |
||
114 | * @param string|null $url can be a relative one or nothing at all ... |
||
115 | * |
||
116 | * @return string full URL currently being called. |
||
117 | */ |
||
118 | public function getCurrentURL($url = '') |
||
133 | } |
||
134 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.