1 | <?php |
||
28 | 1 | class Commune { |
|
29 | 1 | ||
30 | 1 | use FloatScoreTrait; |
|
31 | 1 | use StringCodeDepartementTrait; |
|
32 | 1 | use StringCodeRegionTrait; |
|
33 | use StringCodeTrait; |
||
34 | use StringNomTrait; |
||
35 | |||
36 | /** |
||
37 | * Centre. |
||
38 | * |
||
39 | * @var Point|null |
||
40 | */ |
||
41 | private $centre; |
||
42 | |||
43 | /** |
||
44 | * Codes postaux. |
||
45 | * |
||
46 | * @var string[] |
||
47 | */ |
||
48 | private $codesPostaux; |
||
49 | |||
50 | /** |
||
51 | 35 | * Contour. |
|
52 | * |
||
53 | 35 | * @var Polygon|null |
|
54 | */ |
||
55 | private $contour; |
||
56 | |||
57 | /** |
||
58 | * Département. |
||
59 | * |
||
60 | 10 | * @var Departement|null |
|
61 | 10 | */ |
|
62 | private $departement; |
||
63 | |||
64 | /** |
||
65 | * Population. |
||
66 | * |
||
67 | * @var int|null |
||
68 | */ |
||
69 | 15 | private $population; |
|
70 | 15 | ||
71 | /** |
||
72 | * Région. |
||
73 | * |
||
74 | * @var Region|null |
||
75 | */ |
||
76 | private $region; |
||
77 | |||
78 | /** |
||
79 | 20 | * Surface. |
|
80 | 20 | * |
|
81 | 20 | * @var float|null |
|
82 | */ |
||
83 | private $surface; |
||
84 | |||
85 | /** |
||
86 | * Constructor. |
||
87 | */ |
||
88 | public function __construct() { |
||
91 | 20 | ||
92 | 20 | /** |
|
93 | * Get the centre. |
||
94 | 3 | * |
|
95 | * @return Point|null Returns the centre. |
||
96 | */ |
||
97 | public function getCentre(): ?Point { |
||
100 | |||
101 | /** |
||
102 | * Get the codes postaux. |
||
103 | * |
||
104 | * @return string[] Returns the codes postaux. |
||
105 | */ |
||
106 | public function getCodesPostaux(): ?array { |
||
109 | |||
110 | /** |
||
111 | * Get the contour. |
||
112 | * |
||
113 | * @return Polygon|null Returns the contour. |
||
114 | */ |
||
115 | public function getContour(): ?Polygon { |
||
118 | |||
119 | /** |
||
120 | * Get the département. |
||
121 | * |
||
122 | * @return Departement|null The département. |
||
123 | */ |
||
124 | public function getDepartement(): ?Departement { |
||
127 | |||
128 | /** |
||
129 | * Get the population. |
||
130 | * |
||
131 | * @return int|null Returns the population. |
||
132 | */ |
||
133 | public function getPopulation(): ?int { |
||
136 | |||
137 | /** |
||
138 | * Get the région. |
||
139 | * |
||
140 | * @return Region|null Returns the région. |
||
141 | */ |
||
142 | public function getRegion(): ?Region { |
||
145 | |||
146 | /** |
||
147 | * Get the surface. |
||
148 | * |
||
149 | * @return float|null Returns the surface. |
||
150 | */ |
||
151 | public function getSurface(): ?float { |
||
154 | |||
155 | /** |
||
156 | * Set the centre. |
||
157 | * |
||
158 | * @param Point|null $centre The centre. |
||
159 | * @return Commune Returns this commune. |
||
160 | */ |
||
161 | public function setCentre(?Point $centre): Commune { |
||
165 | |||
166 | /** |
||
167 | * Set the codes postaux. |
||
168 | * |
||
169 | * @param string[] $codesPostaux The codes postaux. |
||
170 | * @return Commune Returns this commune. |
||
171 | */ |
||
172 | public function setCodesPostaux(array $codesPostaux): Commune { |
||
176 | |||
177 | /** |
||
178 | * Set the contour. |
||
179 | * |
||
180 | * @param Polygon|null $contour The contour. |
||
181 | * @return Commune Returns this commune. |
||
182 | */ |
||
183 | public function setContour(?Polygon $contour): Commune { |
||
187 | |||
188 | /** |
||
189 | * Set the département. |
||
190 | * |
||
191 | * @param Departement|null $departement The département. |
||
192 | * @return Commune Returns this commune. |
||
193 | */ |
||
194 | public function setDepartement(?Departement $departement): Commune { |
||
198 | |||
199 | /** |
||
200 | * Set the population. |
||
201 | * |
||
202 | * @param int|null $population The population. |
||
203 | * @return Commune Returns this commune. |
||
204 | */ |
||
205 | public function setPopulation(?int $population): Commune { |
||
209 | |||
210 | /** |
||
211 | * Set the région. |
||
212 | * |
||
213 | * @param Region|null $region The région. |
||
214 | * @return Commune Returns this commune. |
||
215 | */ |
||
216 | public function setRegion(?Region $region): Commune { |
||
220 | |||
221 | /** |
||
222 | * Set the surface. |
||
223 | * |
||
224 | * @param float|null $surface The surface. |
||
225 | * @return Commune Returns this commune. |
||
226 | */ |
||
227 | public function setSurface(?float $surface): Commune { |
||
231 | } |