| 1 | <?php |
||
| 12 | class UserEventSourcedRepository implements UserRepository |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var EventSourcingRepository |
||
| 16 | */ |
||
| 17 | private $repository; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @param EventSourcingRepository $repository |
||
| 23 | */ |
||
| 24 | public function __construct(EventSourcingRepository $repository) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Saves a mini-game |
||
| 31 | * |
||
| 32 | * @param SourcedUser $user |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public function save(SourcedUser $user) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get the user corresponding to the id |
||
| 47 | * |
||
| 48 | * @param ApplicationUserId $id |
||
| 49 | * |
||
| 50 | * @throws MessageAppException |
||
| 51 | * @return SourcedUser |
||
| 52 | */ |
||
| 53 | public function load(ApplicationUserId $id) |
||
| 63 | } |
||
| 64 |