1 | <?php |
||
10 | class Zend1 implements AdapterInterface |
||
11 | { |
||
12 | private $connection; |
||
13 | private $options; |
||
14 | |||
15 | /** |
||
16 | 56 | * @param Options $options |
|
17 | * @param ZendDbAdapter $connection |
||
18 | 56 | */ |
|
19 | 56 | public function __construct(Options $options, ZendDbAdapter $connection) |
|
20 | 56 | { |
|
21 | $this->connection = $connection; |
||
22 | $this->options = $options; |
||
23 | } |
||
24 | |||
25 | 56 | /** |
|
26 | * @return ZendDbAdapter |
||
27 | 56 | */ |
|
28 | 56 | private function getConnection(): ZendDbAdapter |
|
29 | { |
||
30 | return $this->connection; |
||
31 | } |
||
32 | |||
33 | 53 | /** |
|
34 | * @return Options |
||
35 | 53 | */ |
|
36 | public function getOptions(): Options |
||
37 | { |
||
38 | return $this->options; |
||
39 | } |
||
40 | |||
41 | public function beginTransaction(): void |
||
42 | { |
||
43 | 32 | $this->getConnection() |
|
44 | ->beginTransaction(); |
||
45 | 32 | } |
|
46 | 32 | ||
47 | 32 | public function commitTransaction(): void |
|
48 | { |
||
49 | $this->getConnection() |
||
50 | ->commit(); |
||
51 | } |
||
52 | |||
53 | public function rollbackTransaction(): void |
||
54 | { |
||
55 | 17 | $this->getConnection() |
|
56 | ->rollBack(); |
||
57 | 17 | } |
|
58 | |||
59 | public function isInTransaction(): bool |
||
60 | { |
||
61 | return $this->getConnection() |
||
62 | ->getConnection() |
||
63 | 1 | ->inTransaction(); |
|
64 | } |
||
65 | 1 | ||
66 | public function canHandleNestedTransaction(): bool |
||
70 | 1 | ||
71 | 1 | public function quoteIdentifier(string $columnName): string |
|
72 | 1 | { |
|
73 | return $this->getConnection() |
||
74 | 1 | ->quoteIdentifier($columnName); |
|
75 | 1 | } |
|
76 | |||
77 | public function executeInsertSQL(string $sql, array $params = array()) |
||
78 | { |
||
96 | 1 | ||
97 | public function executeSQL(string $sql, array $params = array()): void |
||
102 | |||
103 | public function executeSelectSQL(string $sql, array $params = array()): array |
||
109 | } |
||
110 |