| 1 | <?php |
||
| 9 | abstract class Model |
||
| 10 | { |
||
| 11 | |||
| 12 | /** @var Repository */ |
||
| 13 | private $repository; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Set this model's data repository. |
||
| 17 | * |
||
| 18 | * @param Repository $repository |
||
| 19 | */ |
||
| 20 | public function setRepository(Repository $repository) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get this model's repository. |
||
| 27 | * |
||
| 28 | * @return Repository A subclass of Repository. |
||
| 29 | * @throws \Exception If the repository hasn't been set yet. |
||
| 30 | */ |
||
| 31 | public function getRepository() |
||
| 38 | } |
||
| 39 |