Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\DataStorage |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\DataStorage; |
| 16 | |
| 17 | /** |
| 18 | * Database connection interface. |
| 19 | * |
| 20 | * @package phpOMS\DataStorage |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | interface DataStorageConnectionInterface |
| 26 | { |
| 27 | /** |
| 28 | * Connect to datastorage. |
| 29 | * |
| 30 | * Overwrites current connection if existing |
| 31 | * |
| 32 | * @param null|array $data the basic datastorage information for establishing a connection |
| 33 | * |
| 34 | * @return void |
| 35 | * |
| 36 | * @since 1.0.0 |
| 37 | */ |
| 38 | public function connect(array $data = null) : void; |
| 39 | |
| 40 | /** |
| 41 | * Get the datastorage type. |
| 42 | * |
| 43 | * @return string |
| 44 | * |
| 45 | * @since 1.0.0 |
| 46 | */ |
| 47 | public function getType() : string; |
| 48 | |
| 49 | /** |
| 50 | * Get the datastorage status. |
| 51 | * |
| 52 | * @return int |
| 53 | * |
| 54 | * @since 1.0.0 |
| 55 | */ |
| 56 | public function getStatus() : int; |
| 57 | |
| 58 | /** |
| 59 | * Close datastorage connection. |
| 60 | * |
| 61 | * @return void |
| 62 | * |
| 63 | * @since 1.0.0 |
| 64 | */ |
| 65 | public function close() : void; |
| 66 | } |