| 1 | <?php |
||
| 5 | class EntityProxy extends Proxy |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Underlying entity |
||
| 9 | * |
||
| 10 | * @var mixed |
||
| 11 | */ |
||
| 12 | protected $entity; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Load the underlying relation |
||
| 16 | * |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | protected function loadOnce() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Return the actual Entity |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | public function getUnderlyingObject() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Transparently passes get operation to underlying entity |
||
| 40 | * |
||
| 41 | * @param string $attribute |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | public function __get($attribute) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Transparently passes set operation to underlying entity |
||
| 55 | * |
||
| 56 | * @param string $attribute [description] |
||
| 57 | * @param mixed |
||
| 58 | * @return void |
||
| 59 | */ |
||
| 60 | public function __set($attribute, $value) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Transparently Redirect non overrided calls to the lazy loaded Entity |
||
| 71 | * |
||
| 72 | * @param string $method |
||
| 73 | * @param array $parameters |
||
| 74 | * @return mixed |
||
| 75 | */ |
||
| 76 | public function __call($method, $parameters) |
||
| 84 | } |
||
| 85 |