1 | <?php |
||
9 | class Geocoder { |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $_api_key; |
||
15 | |||
16 | /** |
||
17 | * KSA_Geocoder constructor. |
||
18 | * |
||
19 | * @param array $args |
||
20 | */ |
||
21 | function __construct( $args = array() ) { |
||
30 | |||
31 | /** |
||
32 | * @return string |
||
33 | */ |
||
34 | function api_key() { |
||
39 | |||
40 | /** |
||
41 | * @param string $address |
||
42 | * @return bool |
||
43 | */ |
||
44 | function flush_item_from_cache( $address ) { |
||
49 | |||
50 | /** |
||
51 | * @param string $address |
||
52 | * @return array|\WP_Error |
||
53 | */ |
||
54 | function geocode( $address ) { |
||
82 | |||
83 | /** |
||
84 | * @param string $url |
||
85 | * @return string |
||
86 | */ |
||
87 | private function _make_cache_key( $url ) { |
||
92 | |||
93 | /** |
||
94 | * @param string $address |
||
95 | * @return string |
||
96 | */ |
||
97 | private function _make_url( $address ) { |
||
106 | |||
107 | /** |
||
108 | * Convert the response body into an array containing the latitude/longitude. |
||
109 | * |
||
110 | * @param array $response |
||
111 | * @return array |
||
112 | */ |
||
113 | private function _parse_response( $response ) { |
||
125 | |||
126 | } |
||
127 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.