diff --git a/dibi/drivers/firebird.php b/dibi/drivers/firebird.php index afbb1233..ae3583a8 100644 --- a/dibi/drivers/firebird.php +++ b/dibi/drivers/firebird.php @@ -44,12 +44,12 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('interbase')) { - throw new DibiDriverException("PHP extension 'interbase' is not loaded."); + throw new NotSupportedException("PHP extension 'interbase' is not loaded."); } } @@ -169,7 +169,7 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD public function begin($savepoint = NULL) { if ($savepoint !== NULL) { - throw new DibiDriverException('Savepoints are not supported in Firebird/Interbase.'); + throw new NotSupportedException('Savepoints are not supported in Firebird/Interbase.'); } $this->transaction = ibase_trans($this->resource); $this->inTransaction = TRUE; @@ -186,11 +186,11 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD public function commit($savepoint = NULL) { if ($savepoint !== NULL) { - throw new DibiDriverException('Savepoints are not supported in Firebird/Interbase.'); + throw new NotSupportedException('Savepoints are not supported in Firebird/Interbase.'); } if (!ibase_commit($this->transaction)) { - DibiDriverException('Unable to handle operation - failure when commiting transaction.'); + throw new DibiDriverException('Unable to handle operation - failure when commiting transaction.'); } $this->inTransaction = FALSE; @@ -207,11 +207,11 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD public function rollback($savepoint = NULL) { if ($savepoint !== NULL) { - throw new DibiDriverException('Savepoints are not supported in Firebird/Interbase.'); + throw new NotSupportedException('Savepoints are not supported in Firebird/Interbase.'); } if (!ibase_rollback($this->transaction)) { - DibiDriverException('Unable to handle operation - failure when rolbacking transaction.'); + throw new DibiDriverException('Unable to handle operation - failure when rolbacking transaction.'); } $this->inTransaction = FALSE; @@ -409,7 +409,7 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD */ public function seek($row) { - throw new DibiDriverException("Firebird/Interbase do not support seek in result set."); + throw new NotSupportedException("Firebird/Interbase do not support seek in result set."); } diff --git a/dibi/drivers/mssql.php b/dibi/drivers/mssql.php index 070d40ba..d72adb6d 100644 --- a/dibi/drivers/mssql.php +++ b/dibi/drivers/mssql.php @@ -37,12 +37,12 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('mssql')) { - throw new DibiDriverException("PHP extension 'mssql' is not loaded."); + throw new NotSupportedException("PHP extension 'mssql' is not loaded."); } } diff --git a/dibi/drivers/mssql2005.php b/dibi/drivers/mssql2005.php index 68920540..be16e104 100644 --- a/dibi/drivers/mssql2005.php +++ b/dibi/drivers/mssql2005.php @@ -41,12 +41,12 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver, IDibiResult /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('sqlsrv')) { - throw new DibiDriverException("PHP extension 'sqlsrv' is not loaded."); + throw new NotSupportedException("PHP extension 'sqlsrv' is not loaded."); } } diff --git a/dibi/drivers/mysql.php b/dibi/drivers/mysql.php index a00094f6..c5737c89 100644 --- a/dibi/drivers/mysql.php +++ b/dibi/drivers/mysql.php @@ -53,12 +53,12 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('mysql')) { - throw new DibiDriverException("PHP extension 'mysql' is not loaded."); + throw new NotSupportedException("PHP extension 'mysql' is not loaded."); } } @@ -397,7 +397,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv public function getRowCount() { if (!$this->buffered) { - throw new DibiDriverException('Row count is not available for unbuffered queries.'); + throw new NotSupportedException('Row count is not available for unbuffered queries.'); } return mysql_num_rows($this->resultSet); } @@ -425,7 +425,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv public function seek($row) { if (!$this->buffered) { - throw new DibiDriverException('Cannot seek an unbuffered result set.'); + throw new NotSupportedException('Cannot seek an unbuffered result set.'); } return mysql_data_seek($this->resultSet, $row); diff --git a/dibi/drivers/mysqli.php b/dibi/drivers/mysqli.php index e745e566..b7916991 100644 --- a/dibi/drivers/mysqli.php +++ b/dibi/drivers/mysqli.php @@ -54,12 +54,12 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('mysqli')) { - throw new DibiDriverException("PHP extension 'mysqli' is not loaded."); + throw new NotSupportedException("PHP extension 'mysqli' is not loaded."); } } @@ -393,7 +393,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri public function getRowCount() { if (!$this->buffered) { - throw new DibiDriverException('Row count is not available for unbuffered queries.'); + throw new NotSupportedException('Row count is not available for unbuffered queries.'); } return mysqli_num_rows($this->resultSet); } @@ -421,7 +421,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri public function seek($row) { if (!$this->buffered) { - throw new DibiDriverException('Cannot seek an unbuffered result set.'); + throw new NotSupportedException('Cannot seek an unbuffered result set.'); } return mysqli_data_seek($this->resultSet, $row); } diff --git a/dibi/drivers/odbc.php b/dibi/drivers/odbc.php index 0ce4f828..8915519a 100644 --- a/dibi/drivers/odbc.php +++ b/dibi/drivers/odbc.php @@ -42,12 +42,12 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver, IDibiResultDrive /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('odbc')) { - throw new DibiDriverException("PHP extension 'odbc' is not loaded."); + throw new NotSupportedException("PHP extension 'odbc' is not loaded."); } } @@ -313,7 +313,7 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver, IDibiResultDrive $sql = 'SELECT TOP ' . (int) $limit . ' * FROM (' . $sql . ')'; } - if ($offset) throw new InvalidArgumentException('Offset is not implemented in driver odbc.'); + if ($offset) throw new NotSupportedException('Offset is not implemented in driver odbc.'); } diff --git a/dibi/drivers/oracle.php b/dibi/drivers/oracle.php index 00457761..30b20963 100644 --- a/dibi/drivers/oracle.php +++ b/dibi/drivers/oracle.php @@ -44,12 +44,12 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver, IDibiResultDri /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('oci8')) { - throw new DibiDriverException("PHP extension 'oci8' is not loaded."); + throw new NotSupportedException("PHP extension 'oci8' is not loaded."); } } diff --git a/dibi/drivers/pdo.php b/dibi/drivers/pdo.php index 5efa4312..872ebbf9 100644 --- a/dibi/drivers/pdo.php +++ b/dibi/drivers/pdo.php @@ -42,12 +42,12 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('pdo')) { - throw new DibiDriverException("PHP extension 'pdo' is not loaded."); + throw new NotSupportedException("PHP extension 'pdo' is not loaded."); } } @@ -434,7 +434,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver for ($i = 0; $i < $count; $i++) { $row = @$this->resultSet->getColumnMeta($i); // intentionally @ if ($row === FALSE) { - throw new DibiDriverException('Driver does not support meta data.'); + throw new NotSupportedException('Driver does not support meta data.'); } // PHP < 5.2.3 compatibility // @see: http://php.net/manual/en/pdostatement.getcolumnmeta.php#pdostatement.getcolumnmeta.changelog diff --git a/dibi/drivers/postgre.php b/dibi/drivers/postgre.php index 24eb38f2..1ae8cfba 100644 --- a/dibi/drivers/postgre.php +++ b/dibi/drivers/postgre.php @@ -43,12 +43,12 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('pgsql')) { - throw new DibiDriverException("PHP extension 'pgsql' is not loaded."); + throw new NotSupportedException("PHP extension 'pgsql' is not loaded."); } } diff --git a/dibi/drivers/sqlite.php b/dibi/drivers/sqlite.php index 3c6f0b67..9aa8cf5b 100644 --- a/dibi/drivers/sqlite.php +++ b/dibi/drivers/sqlite.php @@ -51,12 +51,12 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('sqlite')) { - throw new DibiDriverException("PHP extension 'sqlite' is not loaded."); + throw new NotSupportedException("PHP extension 'sqlite' is not loaded."); } } @@ -326,7 +326,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri public function getRowCount() { if (!$this->buffered) { - throw new DibiDriverException('Row count is not available for unbuffered queries.'); + throw new NotSupportedException('Row count is not available for unbuffered queries.'); } return sqlite_num_rows($this->resultSet); } @@ -366,7 +366,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri public function seek($row) { if (!$this->buffered) { - throw new DibiDriverException('Cannot seek an unbuffered result set.'); + throw new NotSupportedException('Cannot seek an unbuffered result set.'); } return sqlite_seek($this->resultSet, $row); } diff --git a/dibi/drivers/sqlite3.php b/dibi/drivers/sqlite3.php index 799d1568..7d383233 100644 --- a/dibi/drivers/sqlite3.php +++ b/dibi/drivers/sqlite3.php @@ -46,12 +46,12 @@ class DibiSqlite3Driver extends DibiObject implements IDibiDriver, IDibiResultDr /** - * @throws DibiException + * @throws NotSupportedException */ public function __construct() { if (!extension_loaded('sqlite3')) { - throw new DibiDriverException("PHP extension 'sqlite3' is not loaded."); + throw new NotSupportedException("PHP extension 'sqlite3' is not loaded."); } }