1 | <?php |
||
10 | class Zend1Adapter implements AdapterInterface |
||
11 | { |
||
12 | /** @var Zend_Db_Adapter_Abstract */ |
||
13 | private $zendAdapter; |
||
14 | /** @var DialectInterface */ |
||
15 | private $dialect; |
||
16 | |||
17 | /** |
||
18 | * Zend1Adapter constructor. |
||
19 | * |
||
20 | * @param Zend_Db_Adapter_Abstract $zendAdapter |
||
21 | * @param DialectInterface $dialect |
||
22 | */ |
||
23 | public function __construct(Zend_Db_Adapter_Abstract $zendAdapter, DialectInterface $dialect) |
||
28 | |||
29 | /** |
||
30 | * @param string $sql |
||
31 | * @param array $bind |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function query($sql, array $bind = []) |
||
39 | |||
40 | /** |
||
41 | * @param string $sql |
||
42 | * @param array $bind |
||
43 | * |
||
44 | * @return Traversable |
||
45 | */ |
||
46 | public function fetch($sql, array $bind = []) |
||
50 | |||
51 | /** |
||
52 | * @param string $sql |
||
53 | * @param array $bind |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | public function fetchAll($sql, array $bind = []) |
||
61 | |||
62 | /** |
||
63 | * @param string $sql |
||
64 | * @param array $bind |
||
65 | * |
||
66 | * @return array|bool |
||
67 | */ |
||
68 | public function fetchRow($sql, array $bind = []) |
||
72 | |||
73 | /** |
||
74 | * @param string $sql |
||
75 | * @param array $bind |
||
76 | * |
||
77 | * @return mixed |
||
78 | */ |
||
79 | public function fetchOne($sql, array $bind = []) |
||
83 | |||
84 | /** |
||
85 | * @param mixed $value |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function quoteValue($value) |
||
93 | |||
94 | /** |
||
95 | * Start a transaction |
||
96 | * |
||
97 | * @return static |
||
98 | */ |
||
99 | public function beginTransaction() |
||
104 | |||
105 | /** |
||
106 | * @return static |
||
107 | */ |
||
108 | public function commit() |
||
113 | |||
114 | /** |
||
115 | * @return static |
||
116 | */ |
||
117 | public function rollback() |
||
122 | |||
123 | /** |
||
124 | * @return DialectInterface |
||
125 | */ |
||
126 | public function getDialect() |
||
130 | } |
||
131 |