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

drivers: changed self:: to static::

This commit is contained in:
Petr Bugyík
2017-12-21 09:06:34 +01:00
committed by David Grudl
parent 44fc3f4553
commit b740b70f18
4 changed files with 5 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
$res = @mysqli_query($this->connection, $sql, $this->buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); // intentionally @ $res = @mysqli_query($this->connection, $sql, $this->buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); // intentionally @
if ($code = mysqli_errno($this->connection)) { if ($code = mysqli_errno($this->connection)) {
throw self::createException(mysqli_error($this->connection), $code, $sql); throw static::createException(mysqli_error($this->connection), $code, $sql);
} elseif (is_object($res)) { } elseif (is_object($res)) {
return $this->createResultDriver($res); return $this->createResultDriver($res);

View File

@@ -120,7 +120,7 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
@oci_execute($res, $this->autocommit ? OCI_COMMIT_ON_SUCCESS : OCI_DEFAULT); @oci_execute($res, $this->autocommit ? OCI_COMMIT_ON_SUCCESS : OCI_DEFAULT);
$err = oci_error($res); $err = oci_error($res);
if ($err) { if ($err) {
throw self::createException($err['message'], $err['code'], $sql); throw static::createException($err['message'], $err['code'], $sql);
} elseif (is_resource($res)) { } elseif (is_resource($res)) {
$this->affectedRows = oci_num_rows($res); $this->affectedRows = oci_num_rows($res);

View File

@@ -96,7 +96,7 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
pg_set_error_verbosity($this->connection, PGSQL_ERRORS_VERBOSE); pg_set_error_verbosity($this->connection, PGSQL_ERRORS_VERBOSE);
if (isset($config['charset']) && pg_set_client_encoding($this->connection, $config['charset'])) { if (isset($config['charset']) && pg_set_client_encoding($this->connection, $config['charset'])) {
throw self::createException(pg_last_error($this->connection)); throw static::createException(pg_last_error($this->connection));
} }
if (isset($config['schema'])) { if (isset($config['schema'])) {
@@ -137,7 +137,7 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
$res = @pg_query($this->connection, $sql); // intentionally @ $res = @pg_query($this->connection, $sql); // intentionally @
if ($res === false) { if ($res === false) {
throw self::createException(pg_last_error($this->connection), null, $sql); throw static::createException(pg_last_error($this->connection), null, $sql);
} elseif (is_resource($res)) { } elseif (is_resource($res)) {
$this->affectedRows = pg_affected_rows($res); $this->affectedRows = pg_affected_rows($res);

View File

@@ -117,7 +117,7 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
$res = @$this->connection->query($sql); // intentionally @ $res = @$this->connection->query($sql); // intentionally @
if ($code = $this->connection->lastErrorCode()) { if ($code = $this->connection->lastErrorCode()) {
throw self::createException($this->connection->lastErrorMsg(), $code, $sql); throw static::createException($this->connection->lastErrorMsg(), $code, $sql);
} elseif ($res instanceof \SQLite3Result && $res->numColumns()) { } elseif ($res instanceof \SQLite3Result && $res->numColumns()) {
return $this->createResultDriver($res); return $this->createResultDriver($res);