| 1 | <?php |
||
| 22 | class Polygon extends GeoJSON implements GeoJSONTypeInterface, Multipliable |
||
| 23 | { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The GeoJSON schema type |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $type = GeoJSON::TYPE_POLYGON; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * The LinearRing collection |
||
| 33 | * @var LinearRing |
||
| 34 | */ |
||
| 35 | private $polygon; |
||
| 36 | |||
| 37 | 8 | public function __construct(LinearRing $polygon) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Exports the type specific schema element(s). |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | 2 | public function export() |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Export the polygon data as an array. |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | 2 | public function exportArray() |
|
| 61 | |||
| 62 | /** |
||
| 63 | * Validate the type specific schema element(s). |
||
| 64 | * @return boolean |
||
| 65 | */ |
||
| 66 | 2 | public function validate() |
|
| 70 | } |
||
| 71 |