1 | <?php |
||
21 | class CommandHandler extends AbstractCommandHandler |
||
22 | { |
||
23 | /** |
||
24 | * @var RepositoryInterface |
||
25 | */ |
||
26 | private $repository; |
||
27 | |||
28 | /** |
||
29 | * CommandHandler constructor. |
||
30 | * @param RepositoryInterface $repository |
||
31 | */ |
||
32 | public function __construct(RepositoryInterface $repository) |
||
36 | |||
37 | /** |
||
38 | * @param CreateRole $createRole |
||
39 | */ |
||
40 | public function handleCreateRole(CreateRole $createRole) |
||
49 | |||
50 | /** |
||
51 | * @param RenameRole $renameRole |
||
52 | */ |
||
53 | public function handleRenameRole(RenameRole $renameRole) |
||
64 | |||
65 | /** |
||
66 | * @param SetConstraint $setConstraint |
||
67 | */ |
||
68 | public function handleSetConstraint(SetConstraint $setConstraint) |
||
79 | |||
80 | /** |
||
81 | * @param AddConstraint $addConstraint |
||
82 | */ |
||
83 | public function handleAddConstraint(AddConstraint $addConstraint) |
||
94 | |||
95 | /** |
||
96 | * @param UpdateConstraint $updateConstraint |
||
97 | */ |
||
98 | public function handleUpdateConstraint(UpdateConstraint $updateConstraint) |
||
109 | |||
110 | /** |
||
111 | * @param AddPermission $addPermission |
||
112 | */ |
||
113 | public function handleAddPermission(AddPermission $addPermission) |
||
124 | |||
125 | /** |
||
126 | * @param RemovePermission $removePermission |
||
127 | */ |
||
128 | public function handleRemovePermission(RemovePermission $removePermission) |
||
139 | |||
140 | /** |
||
141 | * @param AddUser $addUser |
||
142 | */ |
||
143 | public function handleAddUser(AddUser $addUser) |
||
153 | |||
154 | /** |
||
155 | * @param RemoveUser $removeUser |
||
156 | */ |
||
157 | public function handleRemoveUser(RemoveUser $removeUser) |
||
167 | |||
168 | /** |
||
169 | * @param DeleteRole $deleteRole |
||
170 | */ |
||
171 | public function handleDeleteRole(DeleteRole $deleteRole) |
||
181 | |||
182 | /** |
||
183 | * @param AddLabel $addLabel |
||
184 | */ |
||
185 | public function handleAddLabel(AddLabel $addLabel) |
||
195 | |||
196 | /** |
||
197 | * @param RemoveLabel $removeLabel |
||
198 | */ |
||
199 | public function handleRemoveLabel(RemoveLabel $removeLabel) |
||
209 | |||
210 | /** |
||
211 | * @param UUID $uuid |
||
212 | * @return Role |
||
213 | */ |
||
214 | private function load(UUID $uuid) |
||
220 | |||
221 | /** |
||
222 | * @param Role $role |
||
223 | */ |
||
224 | private function save(Role $role) |
||
228 | } |
||
229 |