1 | <?php |
||
34 | class LatLongParser extends StringValueParser { |
||
35 | |||
36 | const TYPE_FLOAT = 'float'; |
||
37 | const TYPE_DMS = 'dms'; |
||
38 | const TYPE_DM = 'dm'; |
||
39 | const TYPE_DD = 'dd'; |
||
40 | |||
41 | /** |
||
42 | * The symbols representing the different directions for usage in directional notation. |
||
43 | */ |
||
44 | const OPT_NORTH_SYMBOL = 'north'; |
||
45 | const OPT_EAST_SYMBOL = 'east'; |
||
46 | const OPT_SOUTH_SYMBOL = 'south'; |
||
47 | const OPT_WEST_SYMBOL = 'west'; |
||
48 | |||
49 | /** |
||
50 | * The symbols representing degrees, minutes and seconds. |
||
51 | */ |
||
52 | const OPT_DEGREE_SYMBOL = 'degree'; |
||
53 | const OPT_MINUTE_SYMBOL = 'minute'; |
||
54 | const OPT_SECOND_SYMBOL = 'second'; |
||
55 | |||
56 | /** |
||
57 | * The symbol to use as separator between latitude and longitude. |
||
58 | */ |
||
59 | const OPT_SEPARATOR_SYMBOL = 'separator'; |
||
60 | |||
61 | /** |
||
62 | * @see StringValueParser::stringParse |
||
63 | * |
||
64 | * @param string $value |
||
65 | * |
||
66 | * @return LatLongValue |
||
67 | * @throws ParseException |
||
68 | */ |
||
69 | protected function stringParse( $value ) { |
||
80 | |||
81 | /** |
||
82 | * @return StringValueParser[] |
||
83 | 2 | */ |
|
84 | protected function getParsers() { |
||
94 | 50 | ||
95 | 50 | /** |
|
96 | * Convenience function for determining if something is a valid coordinate string. |
||
97 | 50 | * Analogous to creating an instance of the parser, parsing the string and checking isValid on the result. |
|
98 | * |
||
99 | * @deprecated since 2.0, please instantiate and call isValid() instead |
||
100 | * |
||
101 | * @param string $string |
||
102 | * |
||
103 | * @return boolean |
||
104 | */ |
||
105 | public static function areCoordinates( $string ) { |
||
114 | |||
115 | } |
||
116 |