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 | * @param string $description |
||
33 | * @throws \InvalidArgumentException |
||
34 | */ |
||
35 | public function __construct($description) |
||
57 | |||
58 | /** |
||
59 | * createPointFrom |
||
60 | * |
||
61 | * Create a point from a description. |
||
62 | * |
||
63 | * @param string $description |
||
64 | * @return Point |
||
65 | */ |
||
66 | protected function createPointFrom($description) |
||
70 | |||
71 | /** |
||
72 | * __toString |
||
73 | * |
||
74 | * Create a string representation of the Circle. |
||
75 | * Actually, it dumps a SQL compatible circle representation. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function __toString() |
||
87 | } |
||
88 |