| 1 | <?php |
||
| 12 | class MiniGameEventSourcedRepository implements GameRepository |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var EventSourcingRepository |
||
| 16 | */ |
||
| 17 | private $repository; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @param EventSourcingRepository $repository |
||
| 23 | */ |
||
| 24 | 15 | public function __construct(EventSourcingRepository $repository) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Saves a mini-game |
||
| 31 | * |
||
| 32 | * @param MiniGame $game |
||
| 33 | * @return MiniGame |
||
| 34 | */ |
||
| 35 | 6 | public function save(MiniGame $game) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Get the mini-game corresponding to the id |
||
| 46 | * |
||
| 47 | * @param MiniGameId $id |
||
| 48 | * @throws GameNotFoundException |
||
| 49 | * @return MiniGame |
||
| 50 | */ |
||
| 51 | 9 | public function load(MiniGameId $id) |
|
| 61 | } |
||
| 62 |