| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | public function __get($key) |
||
| 62 | { |
||
| 63 | // If there's a getter method, call it. |
||
| 64 | $method = 'get' . ucfirst($key); |
||
| 65 | if (method_exists($this, $method)) { |
||
| 66 | return $this->$method(); |
||
| 67 | } |
||
| 68 | |||
| 69 | $this->init(); |
||
| 70 | |||
| 71 | // If the property is defined in our data object, return it. |
||
| 72 | if (isset($this->data->{$key})) { |
||
| 73 | return $this->data->{$key}; |
||
| 74 | } |
||
| 75 | |||
| 76 | return null; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |