| 1 | <?php |
||
| 20 | final class Achievement |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var Game |
||
| 24 | */ |
||
| 25 | private $game; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var UuidInterface |
||
| 29 | */ |
||
| 30 | private $id; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor. |
||
| 34 | * |
||
| 35 | * @param Game $game |
||
| 36 | */ |
||
| 37 | public function __construct(Game $game) |
||
| 38 | { |
||
| 39 | $this->game = $game; |
||
| 40 | $this->id = Uuid::uuid4(); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Gets the game the achievement belongs to. |
||
| 45 | * |
||
| 46 | * @return Game |
||
| 47 | */ |
||
| 48 | 1 | public function getGame(): Game |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Gets the unique identifier. |
||
| 55 | * |
||
| 56 | * @return UuidInterface |
||
| 57 | */ |
||
| 58 | 1 | public function getId(): UuidInterface |
|
| 62 | } |
||
| 63 |