1 | <?php |
||
11 | class CountryURLProvider extends Object implements CountryURLProviderInterface |
||
|
|||
12 | { |
||
13 | |||
14 | |||
15 | /** |
||
16 | * returns the selected country code if there is one ... |
||
17 | * as an uppercase code, e.g. NZ |
||
18 | * @param string|null $url |
||
19 | * |
||
20 | * @return bool |
||
21 | */ |
||
22 | public function hasCountrySegment($url = '') |
||
26 | |||
27 | /** |
||
28 | * returns the selected country code if there is one ... |
||
29 | * as an uppercase code, e.g. NZ |
||
30 | * @param string|null $url |
||
31 | * |
||
32 | * @return string|null |
||
33 | */ |
||
34 | public function CurrentCountrySegment($url = '') |
||
52 | |||
53 | /** |
||
54 | * replaces a country code in a URL with another one |
||
55 | * |
||
56 | * @param string $newCountryCode e.g. NZ / nz |
||
57 | * @param string $url |
||
58 | * |
||
59 | * @return string|null only returns a string if it is different from the original! |
||
60 | */ |
||
61 | public function replaceCountryCodeInUrl($newCountryCode, $url = '') |
||
96 | |||
97 | /** |
||
98 | * |
||
99 | * @param string|null $url can be a relative one or nothing at all ... |
||
100 | * |
||
101 | * @return string full URL currently being called. |
||
102 | */ |
||
103 | public function getCurrentURL($url = '') |
||
112 | } |
||
113 |
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.