1 | <?php |
||
22 | class Circle |
||
23 | { |
||
24 | public $center; |
||
25 | public $radius; |
||
26 | |||
27 | /** |
||
28 | * __construct |
||
29 | * |
||
30 | * Create a circle from a description string. |
||
31 | * |
||
32 | * @access public |
||
33 | * @param string $description |
||
34 | * @throws \InvalidArgumentException |
||
35 | */ |
||
36 | public function __construct($description) |
||
58 | |||
59 | /** |
||
60 | * createPointFrom |
||
61 | * |
||
62 | * Create a point from a description. |
||
63 | * |
||
64 | * @access protected |
||
65 | * @param string $description |
||
66 | * @return Point |
||
67 | */ |
||
68 | protected function createPointFrom($description) |
||
69 | { |
||
70 | return new Point($description); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * __toString |
||
75 | * |
||
76 | * Create a string representation of the Circle. |
||
77 | * Actually, it dumps a SQL compatible circle representation. |
||
78 | * |
||
79 | * @access public |
||
80 | * @return string |
||
81 | */ |
||
82 | public function __toString() |
||
90 | } |
||
91 |