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 | 3 | */ |
|
32 | private $context; |
||
33 | 3 | ||
34 | /** |
||
35 | * Constructor. |
||
36 | */ |
||
37 | public function __construct() |
||
40 | 3 | ||
41 | /** |
||
42 | 3 | * @return ApplicationUserId |
|
43 | */ |
||
44 | public function getId() |
||
48 | |||
49 | /** |
||
50 | 3 | * Returns the command name |
|
51 | * |
||
52 | 3 | * @return string |
|
53 | */ |
||
54 | public function getCommandName() |
||
58 | 3 | ||
59 | /** |
||
60 | 3 | * Returns the user |
|
61 | * |
||
62 | * @return object |
||
63 | */ |
||
64 | public function getOriginalUser() |
||
68 | 3 | ||
69 | /** |
||
70 | 3 | * @return string |
|
71 | */ |
||
72 | public function getPreferredLanguage() |
||
76 | |||
77 | /** |
||
78 | * Returns the context |
||
79 | * |
||
80 | * @return Context |
||
81 | */ |
||
82 | 3 | public function getContext() |
|
86 | 3 | ||
87 | 3 | /** |
|
88 | 3 | * Static constructor. |
|
89 | * |
||
90 | 3 | * @param ApplicationUserId $id |
|
91 | * @param object $originalUser |
||
92 | * @param string $preferredLanguage |
||
93 | * @param Context $context |
||
94 | * |
||
95 | * @return CreateUserCommand |
||
96 | */ |
||
97 | public static function create(ApplicationUserId $id, $originalUser, $preferredLanguage, Context $context = null) |
||
108 | } |
||
109 |