| 1 | <?php |
||
| 10 | class HangmanPlayerCreatedEvent extends HangmanBasicResultEvent implements PlayerCreatedEvent |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | const NAME = 'hangman.player.created'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $playerName; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | private $lives; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $externalReference; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor |
||
| 34 | * |
||
| 35 | * @param MiniGameId $gameId |
||
| 36 | * @param PlayerId $playerId |
||
| 37 | * @param string $playerName |
||
| 38 | * @param int $lives |
||
| 39 | * @param string $externalReference |
||
| 40 | */ |
||
| 41 | 66 | public function __construct(MiniGameId $gameId, PlayerId $playerId, $playerName, $lives, $externalReference) |
|
| 42 | { |
||
| 43 | 66 | parent::__construct(self::NAME, $gameId, $playerId); |
|
| 44 | 66 | $this->playerName = $playerName; |
|
| 45 | 66 | $this->lives = $lives; |
|
| 46 | 66 | $this->externalReference = $externalReference; |
|
| 47 | 66 | } |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 66 | public function getPlayerName() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @return int |
||
| 59 | */ |
||
| 60 | 66 | public function getLives() |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 66 | public function getExternalReference() |
|
| 72 | } |
||
| 73 |