1 | <?php |
||
4 | class ActionRegistry { |
||
5 | |||
6 | /** @var null|AccessControl */ |
||
7 | private $access; |
||
8 | |||
9 | /** @var array|Action[] indexed by ID */ |
||
10 | private $actions = []; |
||
11 | |||
12 | /** |
||
13 | * @return Action[] indexed by ID |
||
14 | */ |
||
15 | public function getAllActions() { |
||
26 | |||
27 | /** |
||
28 | * @param string $id |
||
29 | * @return Action |
||
30 | * @throws \Exception |
||
31 | */ |
||
32 | public function getAction($id) { |
||
39 | |||
40 | /** |
||
41 | * @param string $id |
||
42 | * @param Action $action |
||
43 | * @throws \Exception |
||
44 | * @return Action |
||
45 | */ |
||
46 | public function add($id, Action $action) { |
||
55 | |||
56 | /** |
||
57 | * @param AccessControl $access |
||
58 | */ |
||
59 | public function restrictAccess(AccessControl $access) { |
||
62 | |||
63 | } |