1 | <?php |
||
53 | abstract class DriverAbstract extends ObjectAbstract implements DriverInterface, TagAwareInterface |
||
54 | { |
||
55 | use ConnectTrait, TransactionTrait, ErrorAwareTrait, ProfilerAwareTrait, TagAwareTrait; |
||
56 | |||
57 | /** |
||
58 | * Statement prototype |
||
59 | * |
||
60 | * @var StatementInterface |
||
61 | * @access protected |
||
62 | */ |
||
63 | protected $statement_prototype; |
||
64 | |||
65 | /** |
||
66 | * current statement |
||
67 | * |
||
68 | * @var StatementInterface |
||
69 | * @access protected |
||
70 | */ |
||
71 | protected $statement; |
||
72 | |||
73 | /** |
||
74 | * constructor |
||
75 | * |
||
76 | * @param array $parameters |
||
77 | * @throws LogicException driver specific extension not loaded |
||
78 | * @access public |
||
79 | */ |
||
80 | public function __construct(array $parameters) |
||
90 | |||
91 | /** |
||
92 | * |
||
93 | * @param string $method |
||
94 | * @param array $args |
||
95 | * @return mixed |
||
96 | * @throws BadMethodCallException |
||
97 | * @access public |
||
98 | */ |
||
99 | public function __call(/*# string */ $method, array $args) |
||
111 | |||
112 | /** |
||
113 | * {@inheritDoc} |
||
114 | */ |
||
115 | public function prepare(/*# string */ $sql)/*# : bool */ |
||
131 | |||
132 | /** |
||
133 | * {@inheritDoc} |
||
134 | */ |
||
135 | public function getStatement()/*# : StatementInterface */ |
||
145 | |||
146 | /** |
||
147 | * {@inheritDoc} |
||
148 | */ |
||
149 | public function query( |
||
160 | |||
161 | /** |
||
162 | * {@inheritDoc} |
||
163 | */ |
||
164 | public function getResult()/*# : ResultInterface */ |
||
168 | |||
169 | /** |
||
170 | * {@inheritDoc} |
||
171 | */ |
||
172 | public function lastInsertId($name = null) |
||
179 | |||
180 | /** |
||
181 | * {@inheritDoc} |
||
182 | */ |
||
183 | public function quote( |
||
193 | |||
194 | /** |
||
195 | * Check driver specific extension loaded or not |
||
196 | * |
||
197 | * @return bool |
||
198 | * @access protected |
||
199 | */ |
||
200 | abstract protected function extensionLoaded()/*# : bool */; |
||
201 | |||
202 | /** |
||
203 | * Driver specific last inserted id |
||
204 | * |
||
205 | * @param string|null $name sequence name |
||
206 | * @return string|null |
||
207 | * @access protected |
||
208 | */ |
||
209 | abstract protected function realLastId($name); |
||
210 | |||
211 | /** |
||
212 | * The real quote method |
||
213 | * |
||
214 | * @param mixed $string |
||
215 | * @param int $type |
||
216 | * @return string |
||
217 | * @access protected |
||
218 | */ |
||
219 | abstract protected function realQuote( |
||
223 | } |
||
224 |