1 | <?php |
||
10 | class CreateUserCommand implements NamedCommand, ContextAware |
||
11 | { |
||
12 | const NAME = 'USER.CREATE'; |
||
13 | |||
14 | /** |
||
15 | * @var ApplicationUserId |
||
16 | */ |
||
17 | private $id; |
||
18 | |||
19 | /** |
||
20 | * @var object |
||
21 | */ |
||
22 | private $originalUser; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $preferredLanguage; |
||
28 | |||
29 | /** |
||
30 | * @var Context |
||
31 | */ |
||
32 | private $context; |
||
33 | |||
34 | /** |
||
35 | * Constructor. |
||
36 | */ |
||
37 | 9 | public function __construct() |
|
40 | |||
41 | /** |
||
42 | * @return ApplicationUserId |
||
43 | */ |
||
44 | 9 | public function getId() |
|
48 | |||
49 | /** |
||
50 | * Returns the command name |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 3 | public function getCommandName() |
|
58 | |||
59 | /** |
||
60 | * Returns the user |
||
61 | * |
||
62 | * @return object |
||
63 | */ |
||
64 | 9 | public function getOriginalUser() |
|
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | 9 | public function getPreferredLanguage() |
|
76 | |||
77 | /** |
||
78 | * Returns the context |
||
79 | * |
||
80 | * @return Context |
||
81 | */ |
||
82 | 9 | public function getContext() |
|
86 | |||
87 | /** |
||
88 | * Static constructor. |
||
89 | * |
||
90 | * @param ApplicationUserId $id |
||
91 | * @param object $originalUser |
||
92 | * @param string $preferredLanguage |
||
93 | * @param Context $context |
||
94 | * |
||
95 | * @return CreateUserCommand |
||
96 | */ |
||
97 | 9 | public static function create(ApplicationUserId $id, $originalUser, $preferredLanguage, Context $context = null) |
|
108 | } |
||
109 |