Total Complexity | 9 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class FeatureCollection extends GeoJSONAbstract{ |
||
19 | |||
20 | /** @var \chillerlan\GeoJSON\Feature[] */ |
||
21 | protected array $features = []; |
||
22 | |||
23 | /** |
||
24 | * FeatureCollection constructor. |
||
25 | * |
||
26 | * @param \chillerlan\GeoJSON\Feature[]|null $features |
||
27 | */ |
||
28 | public function __construct(iterable $features = null){ |
||
29 | |||
30 | if(!empty($features)){ |
||
31 | $this->addFeatures($features); |
||
32 | } |
||
33 | |||
34 | } |
||
35 | |||
36 | /** |
||
37 | * |
||
38 | */ |
||
39 | public function addFeature(Feature $feature):FeatureCollection{ |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param \chillerlan\GeoJSON\Feature[] $features |
||
47 | */ |
||
48 | public function addFeatures(iterable $features):FeatureCollection{ |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * |
||
61 | */ |
||
62 | public function clearFeatures():FeatureCollection{ |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * |
||
70 | */ |
||
71 | public function toArray():array{ |
||
84 |