1 | <?php |
||
18 | class Line extends \MapsBaseStrokableElement { |
||
19 | |||
20 | /** |
||
21 | * @since 3.0 |
||
22 | * |
||
23 | * @var LatLongValue[] |
||
24 | */ |
||
25 | protected $coordinates; |
||
26 | |||
27 | /** |
||
28 | * @since 3.0 |
||
29 | * |
||
30 | * @param LatLongValue[] $coordinates |
||
31 | * |
||
32 | * @throws InvalidArgumentException |
||
33 | */ |
||
34 | 6 | public function __construct( array $coordinates = [] ) { |
|
35 | 6 | foreach ( $coordinates as $coordinate ) { |
|
36 | 5 | if ( !( $coordinate instanceof LatLongValue ) ) { |
|
37 | 5 | throw new InvalidArgumentException( 'Can only construct Line with LatLongValue objects' ); |
|
38 | } |
||
39 | } |
||
40 | |||
41 | 3 | $this->coordinates = $coordinates; |
|
42 | |||
43 | 3 | parent::__construct(); |
|
44 | 3 | } |
|
45 | |||
46 | /** |
||
47 | * @since 3.0 |
||
48 | * |
||
49 | * @return LatLongValue[] |
||
50 | */ |
||
51 | 3 | public function getLineCoordinates() { |
|
54 | |||
55 | public function getJSONObject( string $defText = '', string $defTitle = '' ): array { |
||
70 | |||
71 | } |
||
72 |