1 | <?php |
||
9 | class City extends Location |
||
10 | { |
||
11 | /** |
||
12 | * Name of the city. |
||
13 | * @var string |
||
14 | */ |
||
15 | public $name; |
||
16 | |||
17 | /** |
||
18 | * Name of the state the city is in. |
||
19 | * @var string |
||
20 | */ |
||
21 | public $state; |
||
22 | |||
23 | /** |
||
24 | * Name of the country the city is in. |
||
25 | * @var [type] |
||
26 | */ |
||
27 | public $country; |
||
28 | |||
29 | /** |
||
30 | * Creates city object. |
||
31 | * @param string $name Name of the city. |
||
32 | * @param string $state Name of state the city is in. |
||
33 | * @param string $country Name of the country the city is in. |
||
34 | * @param float $lat Latitude of city. |
||
35 | * @param float $lng Longitude of city, |
||
36 | */ |
||
37 | function __construct( |
||
51 | } |
||
52 |
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.