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 Context |
||
20 | */ |
||
21 | private $context; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | */ |
||
26 | 3 | public function __construct() |
|
29 | |||
30 | /** |
||
31 | * Returns the command name |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 3 | public function getCommandName() |
|
39 | |||
40 | /** |
||
41 | * Returns the user |
||
42 | * |
||
43 | * @return object |
||
44 | */ |
||
45 | 3 | public function getOriginalUser() |
|
49 | |||
50 | /** |
||
51 | * Returns the context |
||
52 | * |
||
53 | * @return Context |
||
54 | */ |
||
55 | 3 | public function getContext() |
|
56 | { |
||
57 | 3 | return $this->context; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * Static constructor. |
||
62 | * |
||
63 | * @param object $originalUser |
||
64 | * @param Context $context |
||
65 | * |
||
66 | * @return CreateUserCommand |
||
67 | */ |
||
68 | 3 | public static function create($originalUser, Context $context = null) |
|
77 | } |
||
78 |