1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the geo-api-library package. |
5
|
|
|
* |
6
|
|
|
* (c) 2020 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Library\GeoAPI\Model; |
13
|
|
|
|
14
|
|
|
use WBW\Library\GeoAPI\Model\Attribute\FloatScoreTrait; |
15
|
|
|
use WBW\Library\GeoAPI\Model\Attribute\StringCodeDepartementTrait; |
16
|
|
|
use WBW\Library\GeoAPI\Model\Attribute\StringCodeRegionTrait; |
17
|
|
|
use WBW\Library\GeoAPI\Model\Attribute\StringCodeTrait; |
18
|
|
|
use WBW\Library\GeoAPI\Model\Attribute\StringNomTrait; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Commune. |
22
|
|
|
* |
23
|
|
|
* @author webeweb <https://github.com/webeweb/> |
24
|
|
|
* @package WBW\Library\GeoAPI\Model |
25
|
|
|
*/ |
26
|
|
|
class Commune { |
27
|
|
|
|
28
|
|
|
use FloatScoreTrait; |
29
|
|
|
use StringCodeDepartementTrait; |
30
|
|
|
use StringCodeRegionTrait; |
31
|
|
|
use StringCodeTrait; |
32
|
|
|
use StringNomTrait; |
33
|
|
|
|
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Codes postaux. |
37
|
|
|
* |
38
|
|
|
* @var string[] |
39
|
|
|
*/ |
40
|
|
|
private $codesPostaux; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Population. |
44
|
|
|
* |
45
|
|
|
* @var int |
46
|
|
|
*/ |
47
|
|
|
private $population; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Constructor. |
51
|
|
|
*/ |
52
|
|
|
public function __construct() { |
53
|
|
|
// NOTHING TO TO. |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Get the codes postaux. |
59
|
|
|
* |
60
|
|
|
* @return string[] Returns the codes postaux. |
61
|
|
|
*/ |
62
|
|
|
public function getCodesPostaux() { |
63
|
|
|
return $this->codesPostaux; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Get the population. |
68
|
|
|
* |
69
|
|
|
* @return int Returns the population. |
70
|
|
|
*/ |
71
|
|
|
public function getPopulation() { |
72
|
|
|
return $this->population; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Set the codes postaux. |
77
|
|
|
* |
78
|
|
|
* @param string[] $codesPostaux The codes postaux. |
79
|
|
|
* @return Commune Returns this commune. |
80
|
|
|
*/ |
81
|
|
|
public function setCodesPostaux($codesPostaux) { |
82
|
|
|
$this->codesPostaux = $codesPostaux; |
83
|
|
|
return $this; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Set the population. |
88
|
|
|
* |
89
|
|
|
* @param int $population The population. |
90
|
|
|
* @return Commune Returns this commune. |
91
|
|
|
*/ |
92
|
|
|
public function setPopulation($population) { |
93
|
|
|
$this->population = $population; |
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
} |