| 1 | <?php |
||
| 8 | class DbContext |
||
|
|
|||
| 9 | { |
||
| 10 | |||
| 11 | private $driver; |
||
| 12 | private $driverFactory; |
||
| 13 | private static $instance; |
||
| 14 | |||
| 15 | private function __construct(DriverFactory $driverFactory) |
||
| 20 | |||
| 21 | public static function initialize(DriverFactory $driverFactory) |
||
| 26 | |||
| 27 | public static function getInstance(): DbContext |
||
| 34 | |||
| 35 | /** |
||
| 36 | * |
||
| 37 | * @return Driver |
||
| 38 | */ |
||
| 39 | public function getDriver() : Driver |
||
| 47 | |||
| 48 | public function query($query, $bindData = false) |
||
| 52 | |||
| 53 | public static function destroy() |
||
| 58 | |||
| 59 | } |
||
| 60 |