| 1 | <?php |
||
| 13 | trait RelationshipTrait |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | private $_with = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns "belongs to" relationships. |
||
| 22 | * |
||
| 23 | * @return |
||
| 24 | */ |
||
| 25 | 18 | public function getBelongsToRelationships() |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Gets the defined relationships. |
||
| 32 | * |
||
| 33 | * @return |
||
| 34 | */ |
||
| 35 | 18 | public function getRelationships() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Adds a relationship/s to the model. |
||
| 42 | * |
||
| 43 | * @param string|array $relationships |
||
| 44 | * @return self |
||
| 45 | */ |
||
| 46 | 3 | public function with($relationships) |
|
| 58 | } |
||
| 59 |