1 | <?php |
||
14 | class DatabaseDriver implements DriverInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $configuration = []; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $driver = ''; |
||
25 | |||
26 | /** |
||
27 | * @param string $driver |
||
28 | * @param array $configuration |
||
29 | */ |
||
30 | 18 | public function __construct($driver, $configuration = []) |
|
35 | |||
36 | /** |
||
37 | * Gets the specified driver from the specified database connection. |
||
38 | * |
||
39 | * @param string $driverName |
||
40 | * @param array $configuration |
||
41 | * @return \Rougin\Describe\Driver\DriverInterface |
||
42 | * @throws \Rougin\Describe\Exceptions\DatabaseDriverNotFoundException |
||
43 | */ |
||
44 | 18 | public function getDriver($driverName, $configuration = []) |
|
68 | |||
69 | /** |
||
70 | * Returns the result. |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | 12 | public function getTable($table) |
|
80 | |||
81 | /** |
||
82 | * Shows the list of tables. |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | 6 | public function showTables() |
|
92 | |||
93 | /** |
||
94 | * Parses the configuration into separate variables. |
||
95 | * |
||
96 | * @param array $configuration |
||
97 | * @return array |
||
98 | */ |
||
99 | 18 | protected function parseConfiguration(array $configuration) |
|
114 | } |
||
115 |