1 | <?php |
||
25 | class Registry implements IteratorAggregate |
||
26 | { |
||
27 | /** |
||
28 | * List of workflow actions |
||
29 | * |
||
30 | * @var ActionReferenceInterface[] |
||
31 | */ |
||
32 | private $actions = []; |
||
33 | |||
34 | /** |
||
35 | * Registry constructor. |
||
36 | * |
||
37 | * @param array $actions list of action names associated to action references |
||
38 | */ |
||
39 | public function __construct(array $actions = []) |
||
45 | |||
46 | /** |
||
47 | * Registers action by name in repository |
||
48 | * |
||
49 | * @param string $actionName action name |
||
50 | * @param ActionReferenceInterface $action action reference |
||
51 | */ |
||
52 | public function add($actionName, ActionReferenceInterface $action) |
||
60 | |||
61 | /** |
||
62 | * Returns ActionInterface by name |
||
63 | * |
||
64 | * @param string $actionName action name |
||
65 | * |
||
66 | * @return ActionReferenceInterface |
||
67 | */ |
||
68 | public function get($actionName) |
||
76 | |||
77 | public function getIterator() |
||
81 | } |
||
82 |