1 | <?php |
||
22 | class CommandHandler extends AbstractCommandHandler |
||
23 | { |
||
24 | /** |
||
25 | * @var RepositoryInterface |
||
26 | */ |
||
27 | private $repository; |
||
28 | |||
29 | /** |
||
30 | * CommandHandler constructor. |
||
31 | * @param RepositoryInterface $repository |
||
32 | */ |
||
33 | public function __construct(RepositoryInterface $repository) |
||
37 | |||
38 | /** |
||
39 | * @param CreateRole $createRole |
||
40 | */ |
||
41 | public function handleCreateRole(CreateRole $createRole) |
||
50 | |||
51 | /** |
||
52 | * @param RenameRole $renameRole |
||
53 | */ |
||
54 | public function handleRenameRole(RenameRole $renameRole) |
||
65 | |||
66 | /** |
||
67 | * @param SetConstraint $setConstraint |
||
68 | */ |
||
69 | public function handleSetConstraint(SetConstraint $setConstraint) |
||
80 | |||
81 | /** |
||
82 | * @param AddConstraint $addConstraint |
||
83 | */ |
||
84 | public function handleAddConstraint(AddConstraint $addConstraint): void |
||
95 | |||
96 | /** |
||
97 | * @param UpdateConstraint $updateConstraint |
||
98 | */ |
||
99 | public function handleUpdateConstraint(UpdateConstraint $updateConstraint): void |
||
110 | |||
111 | /** |
||
112 | * @param RemoveConstraint $removeConstraint |
||
113 | */ |
||
114 | public function handleRemoveConstraint(RemoveConstraint $removeConstraint): void |
||
124 | |||
125 | /** |
||
126 | * @param AddPermission $addPermission |
||
127 | */ |
||
128 | public function handleAddPermission(AddPermission $addPermission) |
||
139 | |||
140 | /** |
||
141 | * @param RemovePermission $removePermission |
||
142 | */ |
||
143 | public function handleRemovePermission(RemovePermission $removePermission) |
||
154 | |||
155 | /** |
||
156 | * @param AddUser $addUser |
||
157 | */ |
||
158 | public function handleAddUser(AddUser $addUser) |
||
168 | |||
169 | /** |
||
170 | * @param RemoveUser $removeUser |
||
171 | */ |
||
172 | public function handleRemoveUser(RemoveUser $removeUser) |
||
182 | |||
183 | /** |
||
184 | * @param DeleteRole $deleteRole |
||
185 | */ |
||
186 | public function handleDeleteRole(DeleteRole $deleteRole) |
||
196 | |||
197 | /** |
||
198 | * @param AddLabel $addLabel |
||
199 | */ |
||
200 | public function handleAddLabel(AddLabel $addLabel) |
||
210 | |||
211 | /** |
||
212 | * @param RemoveLabel $removeLabel |
||
213 | */ |
||
214 | public function handleRemoveLabel(RemoveLabel $removeLabel) |
||
224 | |||
225 | /** |
||
226 | * @param UUID $uuid |
||
227 | * @return Role |
||
228 | */ |
||
229 | private function load(UUID $uuid) |
||
235 | |||
236 | /** |
||
237 | * @param Role $role |
||
238 | */ |
||
239 | private function save(Role $role) |
||
243 | } |
||
244 |