1 | <?php |
||
18 | class PhoneField extends Varchar |
||
|
|||
19 | { |
||
20 | private static $default_country_code = "64"; |
||
21 | |||
22 | private static $casting = array( |
||
23 | "TellLink" => "Varchar", |
||
24 | "CallToLink" => "Varchar" |
||
25 | ); |
||
26 | |||
27 | |||
28 | /** |
||
29 | * This method is accessed by other pages! |
||
30 | * |
||
31 | * @param int $countryCode (e.g. 64) |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function IntlFormat($countryCode = "") |
||
52 | |||
53 | /** |
||
54 | * This method is accessed by other pages! |
||
55 | * |
||
56 | * @param int $countryCode (e.g. 64) |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function TellLink($countryCode = "") |
||
64 | |||
65 | |||
66 | |||
67 | /** |
||
68 | * |
||
69 | * @param countryCode $countryCode (e.g. 64) |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function CallToLink($countryCode = "") |
||
77 | |||
78 | /** |
||
79 | * @see DBField::scaffoldFormField() |
||
80 | * |
||
81 | * @param string $title (optional) |
||
82 | * @param array $params (optional) |
||
83 | * |
||
84 | * @return PhoneNumberField | NullableField |
||
85 | */ |
||
86 | public function scaffoldFormField($title = null, $params = null) |
||
94 | |||
95 | /** |
||
96 | * removes a string at the start of a string, if present... |
||
97 | * @param string $str - the haystack |
||
98 | * @param string $prefix - the needle |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | protected function literalLeftTrim($str, $prefix) |
||
109 | } |
||
110 |
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.