Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
| MySQL | |
0.00% |
0 / 9 |
|
0.00% |
0 / 4 |
42 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| runImport | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| preImport | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| postImport | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package ClientDLDB |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
| 6 | **/ |
| 7 | |
| 8 | namespace BO\Zmsdldb\Importer; |
| 9 | |
| 10 | use BO\Zmsdldb\MySQLAccess; |
| 11 | use BO\Zmsdldb\FileAccess |
| 12 | ; |
| 13 | |
| 14 | class MySQL extends Base |
| 15 | { |
| 16 | public function __construct(MySQLAccess $mysqlAccess, FileAccess $fileAccess, int $options = 0) |
| 17 | { |
| 18 | try { |
| 19 | parent::__construct($mysqlAccess, $fileAccess, $options); |
| 20 | } catch (\Exception $e) { |
| 21 | throw $e; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | public function runImport() |
| 26 | { |
| 27 | try { |
| 28 | parent::runImport(); |
| 29 | } catch (\Exception $e) { |
| 30 | $this->rollBack(); |
| 31 | throw $e; |
| 32 | } |
| 33 | } |
| 34 | public function preImport() |
| 35 | { |
| 36 | $this->beginTransaction(); |
| 37 | } |
| 38 | |
| 39 | public function postImport() |
| 40 | { |
| 41 | $this->commit(); |
| 42 | } |
| 43 | } |