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) |
||
95 | |||
96 | /** |
||
97 | * @param UpdateConstraint $updateConstraint |
||
98 | */ |
||
99 | public function handleUpdateConstraint(UpdateConstraint $updateConstraint) |
||
110 | |||
111 | public function handleRemoveConstraint(RemoveConstraint $removeConstraint) |
||
121 | |||
122 | /** |
||
123 | * @param AddPermission $addPermission |
||
124 | */ |
||
125 | public function handleAddPermission(AddPermission $addPermission) |
||
136 | |||
137 | /** |
||
138 | * @param RemovePermission $removePermission |
||
139 | */ |
||
140 | public function handleRemovePermission(RemovePermission $removePermission) |
||
151 | |||
152 | /** |
||
153 | * @param AddUser $addUser |
||
154 | */ |
||
155 | public function handleAddUser(AddUser $addUser) |
||
165 | |||
166 | /** |
||
167 | * @param RemoveUser $removeUser |
||
168 | */ |
||
169 | public function handleRemoveUser(RemoveUser $removeUser) |
||
179 | |||
180 | /** |
||
181 | * @param DeleteRole $deleteRole |
||
182 | */ |
||
183 | public function handleDeleteRole(DeleteRole $deleteRole) |
||
193 | |||
194 | /** |
||
195 | * @param AddLabel $addLabel |
||
196 | */ |
||
197 | public function handleAddLabel(AddLabel $addLabel) |
||
207 | |||
208 | /** |
||
209 | * @param RemoveLabel $removeLabel |
||
210 | */ |
||
211 | public function handleRemoveLabel(RemoveLabel $removeLabel) |
||
221 | |||
222 | /** |
||
223 | * @param UUID $uuid |
||
224 | * @return Role |
||
225 | */ |
||
226 | private function load(UUID $uuid) |
||
232 | |||
233 | /** |
||
234 | * @param Role $role |
||
235 | */ |
||
236 | private function save(Role $role) |
||
240 | } |
||
241 |