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 AddConstraint $addConstraint |
||
67 | */ |
||
68 | public function handleAddConstraint(AddConstraint $addConstraint): void |
||
79 | |||
80 | /** |
||
81 | * @param UpdateConstraint $updateConstraint |
||
82 | */ |
||
83 | public function handleUpdateConstraint(UpdateConstraint $updateConstraint): void |
||
94 | |||
95 | /** |
||
96 | * @param RemoveConstraint $removeConstraint |
||
97 | */ |
||
98 | public function handleRemoveConstraint(RemoveConstraint $removeConstraint): void |
||
108 | |||
109 | /** |
||
110 | * @param AddPermission $addPermission |
||
111 | */ |
||
112 | public function handleAddPermission(AddPermission $addPermission) |
||
123 | |||
124 | /** |
||
125 | * @param RemovePermission $removePermission |
||
126 | */ |
||
127 | public function handleRemovePermission(RemovePermission $removePermission) |
||
138 | |||
139 | /** |
||
140 | * @param AddUser $addUser |
||
141 | */ |
||
142 | public function handleAddUser(AddUser $addUser) |
||
152 | |||
153 | /** |
||
154 | * @param RemoveUser $removeUser |
||
155 | */ |
||
156 | public function handleRemoveUser(RemoveUser $removeUser) |
||
166 | |||
167 | /** |
||
168 | * @param DeleteRole $deleteRole |
||
169 | */ |
||
170 | public function handleDeleteRole(DeleteRole $deleteRole) |
||
180 | |||
181 | /** |
||
182 | * @param AddLabel $addLabel |
||
183 | */ |
||
184 | public function handleAddLabel(AddLabel $addLabel) |
||
194 | |||
195 | /** |
||
196 | * @param RemoveLabel $removeLabel |
||
197 | */ |
||
198 | public function handleRemoveLabel(RemoveLabel $removeLabel) |
||
208 | |||
209 | /** |
||
210 | * @param UUID $uuid |
||
211 | * @return Role |
||
212 | */ |
||
213 | private function load(UUID $uuid) |
||
219 | |||
220 | /** |
||
221 | * @param Role $role |
||
222 | */ |
||
223 | private function save(Role $role) |
||
227 | } |
||
228 |