| @@ 152-160 (lines=9) @@ | ||
| 149 | * @param string $file |
|
| 150 | * @param string $db |
|
| 151 | */ |
|
| 152 | public function dump($file = null, $db = null) |
|
| 153 | { |
|
| 154 | $dbComponent = $this->getDbComponent($db); |
|
| 155 | $filePath = $this->getDumpFilePath($file); |
|
| 156 | ||
| 157 | $dumper = $this->createDumper($dbComponent); |
|
| 158 | ||
| 159 | $dumper->dump($filePath); |
|
| 160 | } |
|
| 161 | ||
| 162 | /** |
|
| 163 | * Restore database from file. |
|
| @@ 170-178 (lines=9) @@ | ||
| 167 | * @param string $file |
|
| 168 | * @param string $db |
|
| 169 | */ |
|
| 170 | public function restore($file = null, $db = null) |
|
| 171 | { |
|
| 172 | $dbComponent = $this->getDbComponent($db); |
|
| 173 | $filePath = $this->getDumpFilePath($file); |
|
| 174 | ||
| 175 | $dumper = $this->createDumper($dbComponent); |
|
| 176 | ||
| 177 | $dumper->restore($filePath); |
|
| 178 | } |
|
| 179 | } |
|
| 180 | ||