@@ -22,6 +22,9 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $key |
|
| 27 | + */ |
|
| 25 | 28 | public function __set($key, $value) |
| 26 | 29 | { |
| 27 | 30 | if ($key == 'id' && $this->getId()) { |
@@ -31,6 +34,9 @@ discard block |
||
| 31 | 34 | $this->$key = $value; |
| 32 | 35 | } |
| 33 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $key |
|
| 39 | + */ |
|
| 34 | 40 | public function __get($key) |
| 35 | 41 | { |
| 36 | 42 | if (property_exists($this, $key)) { |
@@ -74,13 +74,13 @@ |
||
| 74 | 74 | |
| 75 | 75 | public function __call($name, $params) |
| 76 | 76 | { |
| 77 | - if(strlen($name) > 3) { |
|
| 77 | + if (strlen($name) > 3) { |
|
| 78 | 78 | $property = substr($name, 3); |
| 79 | 79 | $property[0] = strtolower($property[0]); |
| 80 | - if(strpos($name, 'get') === 0) { |
|
| 80 | + if (strpos($name, 'get') === 0) { |
|
| 81 | 81 | return $this->__get($property); |
| 82 | 82 | } |
| 83 | - if(strpos($name, 'set') === 0) { |
|
| 83 | + if (strpos($name, 'set') === 0) { |
|
| 84 | 84 | return $this->__set($property, $params[0]); |
| 85 | 85 | } |
| 86 | 86 | } |