1 | <?php |
||
4 | class ActionRegistry { |
||
5 | |||
6 | /** @var array|Action[] indexed by ID */ |
||
7 | private $actions = []; |
||
8 | |||
9 | /** |
||
10 | * @return Action[] indexed by ID |
||
11 | */ |
||
12 | public function getAllActions() { |
||
15 | |||
16 | /** |
||
17 | * @param string $id |
||
18 | * @return Action |
||
19 | * @throws \Exception |
||
20 | */ |
||
21 | public function getAction($id) { |
||
28 | |||
29 | /** |
||
30 | * @param string $id |
||
31 | * @param Action $action |
||
32 | * @throws \Exception |
||
33 | * @return Action |
||
34 | */ |
||
35 | public function add($id, Action $action) { |
||
44 | } |