@@ 24-82 (lines=59) @@ | ||
21 | * |
|
22 | * @author GeLo <[email protected]> |
|
23 | */ |
|
24 | class Circle implements ExtendableInterface, OptionsAwareInterface |
|
25 | { |
|
26 | use OptionsAwareTrait; |
|
27 | use VariableAwareTrait; |
|
28 | ||
29 | /** |
|
30 | * @var Coordinate |
|
31 | */ |
|
32 | private $center; |
|
33 | ||
34 | /** |
|
35 | * @var float |
|
36 | */ |
|
37 | private $radius; |
|
38 | ||
39 | /** |
|
40 | * @param float $radius |
|
41 | * @param mixed[] $options |
|
42 | */ |
|
43 | public function __construct(Coordinate $center, $radius = 1.0, array $options = []) |
|
44 | { |
|
45 | $this->setCenter($center); |
|
46 | $this->setRadius($radius); |
|
47 | $this->addOptions($options); |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * @return Coordinate |
|
52 | */ |
|
53 | public function getCenter() |
|
54 | { |
|
55 | return $this->center; |
|
56 | } |
|
57 | ||
58 | public function setCenter(Coordinate $center) |
|
59 | { |
|
60 | $this->center = $center; |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * @return float |
|
65 | */ |
|
66 | public function getRadius() |
|
67 | { |
|
68 | return $this->radius; |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * @param float $radius |
|
73 | */ |
|
74 | public function setRadius($radius) |
|
75 | { |
|
76 | $this->radius = $radius; |
|
77 | } |
|
78 | } |
|
79 |
@@ 24-82 (lines=59) @@ | ||
21 | * |
|
22 | * @author GeLo <[email protected]> |
|
23 | */ |
|
24 | class GroundOverlay implements ExtendableInterface, OptionsAwareInterface |
|
25 | { |
|
26 | use OptionsAwareTrait; |
|
27 | use VariableAwareTrait; |
|
28 | ||
29 | /** |
|
30 | * @var string |
|
31 | */ |
|
32 | private $url; |
|
33 | ||
34 | /** |
|
35 | * @var Bound |
|
36 | */ |
|
37 | private $bound; |
|
38 | ||
39 | /** |
|
40 | * @param string $url |
|
41 | * @param mixed[] $options |
|
42 | */ |
|
43 | public function __construct($url, Bound $bound, array $options = []) |
|
44 | { |
|
45 | $this->setUrl($url); |
|
46 | $this->setBound($bound); |
|
47 | $this->addOptions($options); |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * @return string |
|
52 | */ |
|
53 | public function getUrl() |
|
54 | { |
|
55 | return $this->url; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * @param string $url |
|
60 | */ |
|
61 | public function setUrl($url) |
|
62 | { |
|
63 | $this->url = $url; |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * @return Bound |
|
68 | */ |
|
69 | public function getBound() |
|
70 | { |
|
71 | return $this->bound; |
|
72 | } |
|
73 | ||
74 | public function setBound(Bound $bound) |
|
75 | { |
|
76 | $this->bound = $bound; |
|
77 | } |
|
78 | } |
|
79 |