Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function parse( $value ) { |
||
32 | $parameters = explode( '~', $value ); |
||
33 | $imageParameters = explode( ':', $parameters[0], 3 ); |
||
34 | |||
35 | if ( count( $imageParameters ) === 3 ) { |
||
36 | $boundsNorthEast = $this->stringToLatLongValue( $imageParameters[0] ); |
||
37 | $boundsSouthWest = $this->stringToLatLongValue( $imageParameters[1] ); |
||
38 | $imageUrl = \MapsMapper::getFileUrl( $imageParameters[2] ); |
||
|
|||
39 | |||
40 | return new ImageOverlay( $boundsNorthEast, $boundsSouthWest, $imageUrl ); |
||
41 | } |
||
42 | |||
43 | throw new ParseException( 'Need 3 parameters for an image overlay' ); |
||
44 | } |
||
45 | |||
57 |
This method has been deprecated.