1 | <?php |
||
17 | class Line3D extends Line2D implements LineInterface { |
||
18 | /** |
||
19 | * Method checks sent variable and throws LineException if it is not an Point3D instance. |
||
20 | * |
||
21 | * @param mixed $point Variable to check. |
||
22 | * @throws LineException If sent argument is not an Point3D instance. |
||
23 | */ |
||
24 | protected function checkPoint($point) |
||
30 | |||
31 | /** |
||
32 | * Method counts width. |
||
33 | * |
||
34 | * return float Line width. |
||
35 | */ |
||
36 | protected function countLength() |
||
37 | { |
||
38 | return sqrt(pow($this->from->x - $this->to->x, 2) + pow($this->from->y - $this->to->y, 2) + pow($this->from->z - $this->to->z, 2)); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Line3D constructor. |
||
43 | * |
||
44 | * @param mixed $from First end of the line. |
||
45 | * @param mixed $to Second end of the line. |
||
46 | */ |
||
47 | public function __construct($from, $to) |
||
51 | } |
||
52 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.