1 | <?php |
||
9 | class CreateUserCommand implements NamedCommand, ContextAware |
||
10 | { |
||
11 | const NAME = 'USER.CREATE'; |
||
12 | |||
13 | /** |
||
14 | * @var object |
||
15 | */ |
||
16 | private $originalUser; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $preferredLanguage; |
||
22 | |||
23 | /** |
||
24 | * @var Context |
||
25 | */ |
||
26 | private $context; |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | */ |
||
31 | 3 | public function __construct() |
|
34 | |||
35 | /** |
||
36 | * Returns the command name |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 3 | public function getCommandName() |
|
44 | |||
45 | /** |
||
46 | * Returns the user |
||
47 | * |
||
48 | * @return object |
||
49 | */ |
||
50 | 3 | public function getOriginalUser() |
|
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | 3 | public function getPreferredLanguage() |
|
62 | |||
63 | /** |
||
64 | * Returns the context |
||
65 | * |
||
66 | * @return Context |
||
67 | */ |
||
68 | 3 | public function getContext() |
|
72 | |||
73 | /** |
||
74 | * Static constructor. |
||
75 | * |
||
76 | * @param object $originalUser |
||
77 | * @param string $preferredLanguage |
||
78 | * @param Context $context |
||
79 | * |
||
80 | * @return CreateUserCommand |
||
81 | */ |
||
82 | 3 | public static function create($originalUser, $preferredLanguage, Context $context = null) |
|
92 | } |
||
93 |