1 | <?php |
||
27 | class DBALException extends \Exception |
||
28 | { |
||
29 | /** |
||
30 | * @param string $method |
||
31 | * |
||
32 | * @return \Doctrine\DBAL\DBALException |
||
33 | */ |
||
34 | 49 | public static function notSupported($method) |
|
38 | |||
39 | public static function invalidPlatformSpecified() : self |
||
45 | |||
46 | /** |
||
47 | * @param mixed $invalidPlatform |
||
48 | */ |
||
49 | 3 | public static function invalidPlatformType($invalidPlatform) : self |
|
69 | |||
70 | /** |
||
71 | * Returns a new instance for an invalid specified platform version. |
||
72 | * |
||
73 | * @param string $version The invalid platform version given. |
||
74 | * @param string $expectedFormat The expected platform version format. |
||
75 | * |
||
76 | * @return DBALException |
||
77 | */ |
||
78 | 10 | public static function invalidPlatformVersionSpecified($version, $expectedFormat) |
|
89 | |||
90 | /** |
||
91 | * @return \Doctrine\DBAL\DBALException |
||
92 | */ |
||
93 | 1 | public static function invalidPdoInstance() |
|
100 | |||
101 | /** |
||
102 | * @param string|null $url The URL that was provided in the connection parameters (if any). |
||
103 | * |
||
104 | * @return \Doctrine\DBAL\DBALException |
||
105 | */ |
||
106 | 5 | public static function driverRequired($url = null) |
|
121 | |||
122 | /** |
||
123 | * @param string $unknownDriverName |
||
124 | * @param array $knownDrivers |
||
125 | * |
||
126 | * @return \Doctrine\DBAL\DBALException |
||
127 | */ |
||
128 | 1 | public static function unknownDriver($unknownDriverName, array $knownDrivers) |
|
133 | |||
134 | /** |
||
135 | * @param \Doctrine\DBAL\Driver $driver |
||
136 | * @param \Exception $driverEx |
||
137 | * @param string $sql |
||
138 | * @param array $params |
||
139 | * |
||
140 | * @return \Doctrine\DBAL\DBALException |
||
141 | */ |
||
142 | 69 | public static function driverExceptionDuringQuery(Driver $driver, \Exception $driverEx, $sql, array $params = []) |
|
152 | |||
153 | /** |
||
154 | * @param \Doctrine\DBAL\Driver $driver |
||
155 | * @param \Exception $driverEx |
||
156 | * |
||
157 | * @return \Doctrine\DBAL\DBALException |
||
158 | */ |
||
159 | 1 | public static function driverException(Driver $driver, \Exception $driverEx) |
|
163 | |||
164 | /** |
||
165 | * @param \Doctrine\DBAL\Driver $driver |
||
166 | * @param \Exception $driverEx |
||
167 | * |
||
168 | * @return \Doctrine\DBAL\DBALException |
||
169 | */ |
||
170 | 70 | private static function wrapException(Driver $driver, \Exception $driverEx, $msg) |
|
181 | |||
182 | /** |
||
183 | * Returns a human-readable representation of an array of parameters. |
||
184 | * This properly handles binary data by returning a hex representation. |
||
185 | * |
||
186 | * @param array $params |
||
187 | * |
||
188 | * @return string |
||
189 | */ |
||
190 | private static function formatParameters(array $params) |
||
203 | |||
204 | /** |
||
205 | * @param string $wrapperClass |
||
206 | * |
||
207 | * @return \Doctrine\DBAL\DBALException |
||
208 | */ |
||
209 | 1 | public static function invalidWrapperClass($wrapperClass) |
|
214 | |||
215 | /** |
||
216 | * @param string $driverClass |
||
217 | * |
||
218 | * @return \Doctrine\DBAL\DBALException |
||
219 | */ |
||
220 | 1 | public static function invalidDriverClass($driverClass) |
|
225 | |||
226 | /** |
||
227 | * @param string $tableName |
||
228 | * |
||
229 | * @return \Doctrine\DBAL\DBALException |
||
230 | */ |
||
231 | 1 | public static function invalidTableName($tableName) |
|
235 | |||
236 | /** |
||
237 | * @param string $tableName |
||
238 | * |
||
239 | * @return \Doctrine\DBAL\DBALException |
||
240 | */ |
||
241 | 16 | public static function noColumnsSpecifiedForTable($tableName) |
|
245 | |||
246 | /** |
||
247 | * @return \Doctrine\DBAL\DBALException |
||
248 | */ |
||
249 | public static function limitOffsetInvalid() |
||
253 | |||
254 | /** |
||
255 | * @param string $name |
||
256 | * |
||
257 | * @return \Doctrine\DBAL\DBALException |
||
258 | */ |
||
259 | public static function typeExists($name) |
||
263 | |||
264 | /** |
||
265 | * @param string $name |
||
266 | * |
||
267 | * @return \Doctrine\DBAL\DBALException |
||
268 | */ |
||
269 | public static function unknownColumnType($name) |
||
280 | |||
281 | /** |
||
282 | * @param string $name |
||
283 | * |
||
284 | * @return \Doctrine\DBAL\DBALException |
||
285 | */ |
||
286 | 16 | public static function typeNotFound($name) |
|
290 | } |
||
291 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: