1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

- binary unescape doesn't throw exceptions more

This commit is contained in:
David Grudl
2009-07-08 12:10:32 +00:00
parent a3f673e82b
commit 0d79d16d2c
9 changed files with 26 additions and 5 deletions

View File

@@ -242,6 +242,9 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -242,6 +242,9 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -320,6 +320,9 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -303,6 +303,9 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -248,6 +248,9 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -249,6 +249,9 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -291,6 +291,9 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -289,13 +289,10 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
switch ($type) {
case dibi::BINARY:
if ($type === dibi::BINARY) {
return pg_unescape_bytea($value);
default:
throw new InvalidArgumentException('Unsupported type.');
}
throw new InvalidArgumentException('Unsupported type.');
}

View File

@@ -262,6 +262,9 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
*/
public function unescape($value, $type)
{
if ($type === dibi::BINARY) {
return $value;
}
throw new InvalidArgumentException('Unsupported type.');
}