| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | class GenericLazy implements LazyInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * |
||
| 27 | * A Relation object between native and foreign types. |
||
| 28 | * |
||
| 29 | * @var RelationInterface |
||
| 30 | * |
||
| 31 | */ |
||
| 32 | protected $relation; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * |
||
| 36 | * Constructor. |
||
| 37 | * |
||
| 38 | * @param RelationInterface $relation A relation between native and |
||
| 39 | * foreign types. |
||
| 40 | * |
||
| 41 | */ |
||
| 42 | public function __construct(RelationInterface $relation) |
||
| 43 | { |
||
| 44 | $this->relation = $relation; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * |
||
| 49 | * Gets a related foreign entity or collection for a native entity. |
||
| 50 | * |
||
| 51 | * @param object $entity The native entity. |
||
| 52 | * |
||
| 53 | * @return object The related foreign entity or collection. |
||
| 54 | * |
||
| 55 | */ |
||
| 56 | public function get($entity) |
||
| 59 | } |
||
| 60 | } |
||
| 61 |