1 | <?php declare(strict_types=1); |
||
14 | class TableDumperCollection extends ArrayObject |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritDoc} |
||
18 | */ |
||
19 | 15 | public function append($value) |
|
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | 72 | public function offsetSet($index, $newval) |
|
43 | |||
44 | |||
45 | /** |
||
46 | * @param Table|string Adds a table, either by name, or by Table instance, to the collection |
||
47 | * |
||
48 | * @return TableDumper Retruns a TableDumper of the table that was just added |
||
49 | */ |
||
50 | 57 | public function addTable($table): TableDumper |
|
69 | |||
70 | |||
71 | /** |
||
72 | * @param TableDumperCollection|array<TableDumper|Table|string> Adds a list of tables, either by passing TableDumperCollection, or an array containing either TableDumper objects, Table objects or table naes |
||
73 | * |
||
74 | * @return TableDumperCollection Returns a TableDumperCollection of the list of tables that was just added |
||
75 | */ |
||
76 | 33 | public function addListTables($listTables): TableDumperCollection |
|
91 | |||
92 | /** |
||
93 | * Adds a list of tables passed as an array |
||
94 | * @param array $listTables Array of tables to add |
||
95 | * |
||
96 | * @return TableDumperCollection Returns a TableDumperCollection of the list of tables that was just added |
||
97 | */ |
||
98 | 27 | protected function addListTableArray(array $listTables): TableDumperCollection |
|
115 | |||
116 | /** |
||
117 | * Writes all DROP statements to the dump stream |
||
118 | * |
||
119 | * @param resource $stream Stream to write the dump to |
||
120 | * |
||
121 | * @return void |
||
122 | */ |
||
123 | 9 | public function dumpDropStatements($stream): void |
|
131 | |||
132 | /** |
||
133 | * Writes all INSERT statements to the dump stream |
||
134 | * |
||
135 | * @param PDO $db PDO instance to use for DB queries |
||
136 | * @param resource $stream Stream to write the dump to |
||
137 | * |
||
138 | * @return void |
||
139 | */ |
||
140 | 9 | public function dumpInsertStatements(PDO $db, $stream): void |
|
148 | |||
149 | /** |
||
150 | * Writes all the SQL statements of this dumper to the dump stream |
||
151 | * |
||
152 | * @param PDO $db PDO instance to use for DB queries |
||
153 | * @param resource $stream Stream to write the dump to |
||
154 | * @param boolean $groupDrops Determines if DROP statements will be grouped |
||
155 | * @param boolean $groupInserts Determines if INSERT statements will be grouped |
||
156 | * |
||
157 | * @return void |
||
158 | */ |
||
159 | 30 | public function dump(PDO $db, $stream, bool $groupDrops = false, bool $groupInserts = false): void |
|
181 | |||
182 | |||
183 | 6 | public function __call(string $name, array $arguments) |
|
192 | } |