1 | <?php |
||
5 | class AdapterFactory |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * Create adapter from an existing connection resource |
||
10 | * |
||
11 | * @param mixed $resource database connection object (mysqli, pdo_mysql,...) |
||
12 | * @throws Exception\InvalidArgumentException |
||
13 | * @throws Exception\UnsupportedDriverException |
||
14 | * @return Adapter\AdapterInterface |
||
15 | */ |
||
16 | 3 | public static function createAdapterFromResource($resource) |
|
33 | |||
34 | |||
35 | /** |
||
36 | * Get an adapter from an existing connection resource |
||
37 | * |
||
38 | * @param \PDO $resource database connection object |
||
39 | * @throws Exception\UnsupportedDriverException |
||
40 | * @return Adapter\AdapterInterface |
||
41 | */ |
||
42 | 2 | protected static function getAdapterFromPdo(\PDO $resource) { |
|
55 | } |
||
56 |