1 | <?php |
||
11 | abstract class AbstractPlayerCommand implements NamedCommand, ContextAware |
||
12 | { |
||
13 | /** |
||
14 | * @var MiniGameId |
||
15 | */ |
||
16 | protected $gameId; |
||
17 | |||
18 | /** |
||
19 | * @var PlayerId |
||
20 | */ |
||
21 | protected $playerId; |
||
22 | |||
23 | /** |
||
24 | * @var Context |
||
25 | */ |
||
26 | protected $context; |
||
27 | |||
28 | /** |
||
29 | * Init. |
||
30 | * |
||
31 | * @param MiniGameId $gameId |
||
32 | * @param PlayerId $playerId |
||
33 | * @param Context $context |
||
34 | */ |
||
35 | 54 | protected function init( |
|
44 | |||
45 | /** |
||
46 | * Returns the minigame id |
||
47 | * |
||
48 | * @return MiniGameId |
||
49 | */ |
||
50 | 54 | public function getGameId() |
|
54 | |||
55 | /** |
||
56 | * Returns the player id |
||
57 | * |
||
58 | * @return PlayerId |
||
59 | */ |
||
60 | 51 | public function getPlayerId() |
|
64 | |||
65 | /** |
||
66 | * Returns the command name |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | abstract public function getCommandName(); |
||
71 | |||
72 | /** |
||
73 | * Returns the context |
||
74 | * |
||
75 | * @return Context |
||
76 | */ |
||
77 | 54 | public function getContext() |
|
81 | } |
||
82 |