1 | <?php |
||
20 | class Batch implements OperationInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var OperationInterface[] |
||
24 | */ |
||
25 | private $operations = []; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $operationName; |
||
31 | |||
32 | /** |
||
33 | * Batch constructor. |
||
34 | * |
||
35 | * @param OperationInterface[] |
||
36 | */ |
||
37 | 1 | public function __construct(array $operations = []) |
|
43 | |||
44 | /** |
||
45 | * Adds a single operation. |
||
46 | * Note that only operations with the same operation name can be added. |
||
47 | * First operation which is added will be the reference and the instance will let you only add |
||
48 | * other operations with the same operation name. |
||
49 | * |
||
50 | * @param OperationInterface $operation |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | 1 | public function addOperation(OperationInterface $operation) |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 1 | public function getName() |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 1 | public function getOperationParameter() |
|
92 | } |
||
93 |