1 | <?php |
||
18 | class Transaction implements TransactionInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var CommandInterface[] |
||
22 | */ |
||
23 | private $commands = []; |
||
24 | |||
25 | /** |
||
26 | * Store entity information (update or insert). |
||
27 | * |
||
28 | * @param RecordInterface $record |
||
29 | * |
||
30 | * @throws RecordException |
||
31 | */ |
||
32 | public function store(RecordInterface $record) |
||
36 | |||
37 | /** |
||
38 | * Delete entity from database. |
||
39 | * |
||
40 | * @param RecordInterface $record |
||
41 | * |
||
42 | * @throws RecordException |
||
43 | */ |
||
44 | public function delete(RecordInterface $record) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | final public function addCommand(CommandInterface $command) |
||
56 | |||
57 | /** |
||
58 | * @return \Generator |
||
59 | */ |
||
60 | final public function getCommands() |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | * |
||
74 | * Executing transaction. |
||
75 | */ |
||
76 | public function run() |
||
126 | } |