| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function offsetGet($field) |
||
| 41 | { |
||
| 42 | // get the field value |
||
| 43 | $value = $this->data[$field]; |
||
| 44 | |||
| 45 | // is it a Lazy placeholder? |
||
| 46 | if ($value instanceof LazyInterface) { |
||
| 47 | // replace the Lazy placeholder with the real object |
||
| 48 | $value = $value->get($this); |
||
| 49 | // retain the real object |
||
| 50 | $this->offsetSet($field, $value); |
||
| 51 | } |
||
| 52 | |||
| 53 | // done! |
||
| 54 | return $value; |
||
| 55 | } |
||
| 57 |