1 | <?php |
||
24 | class City extends Location |
||
25 | { |
||
26 | /** |
||
27 | * @var int The city id. |
||
28 | */ |
||
29 | public $id; |
||
30 | |||
31 | /** |
||
32 | * @var string The name of the city. |
||
33 | */ |
||
34 | public $name; |
||
35 | |||
36 | /** |
||
37 | * @var string The abbreviation of the country the city is located in. |
||
38 | */ |
||
39 | public $country; |
||
40 | |||
41 | /** |
||
42 | * @var int The city's population |
||
43 | */ |
||
44 | public $population; |
||
45 | |||
46 | /** |
||
47 | * @var \DateTimeZone|null The shift in seconds from UTC |
||
48 | */ |
||
49 | public $timezone; |
||
50 | |||
51 | /** |
||
52 | * Create a new city object. |
||
53 | * |
||
54 | * @param int $id The city id. |
||
55 | * @param string $name The name of the city. |
||
56 | * @param float $lat The latitude of the city. |
||
57 | * @param float $lon The longitude of the city. |
||
58 | * @param string $country The abbreviation of the country the city is located in |
||
59 | * @param int $population The city's population. |
||
60 | * @param int $timezoneOffset The shift in seconds from UTC. |
||
61 | * |
||
62 | * @internal |
||
63 | */ |
||
64 | public function __construct($id, $name = null, $lat = null, $lon = null, $country = null, $population = null, $timezoneOffset = null) |
||
74 | |||
75 | /** |
||
76 | * @param int $offset The timezone offset in seconds from UTC. |
||
77 | * @return int The timezone offset in +/-HH:MM form. |
||
78 | */ |
||
79 | private static function timezoneOffsetInSecondsToHours($offset) |
||
90 | } |
||
91 |