1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 21:28:02 +02:00

Connection, dibi: deprecated insertId() & affectedRows()

This commit is contained in:
David Grudl
2017-09-07 20:45:21 +02:00
parent 0531e82838
commit 125db626e5
2 changed files with 8 additions and 8 deletions

View File

@@ -312,11 +312,11 @@ class Connection
/**
* Gets the number of affected rows. Alias for getAffectedRows().
* @throws Exception
* @deprecated
*/
public function affectedRows(): int
{
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
return $this->getAffectedRows();
}
@@ -337,11 +337,11 @@ class Connection
/**
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
* @throws Exception
* @deprecated
*/
public function insertId(string $sequence = null): int
{
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
return $this->getInsertId($sequence);
}

View File

@@ -226,11 +226,11 @@ class dibi
/**
* Gets the number of affected rows. Alias for getAffectedRows().
* @throws Dibi\Exception
* @deprecated
*/
public static function affectedRows(): int
{
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
return self::getConnection()->getAffectedRows();
}
@@ -247,11 +247,11 @@ class dibi
/**
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
* @throws Dibi\Exception
* @deprecated
*/
public static function insertId(string $sequence = null): int
{
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
return self::getConnection()->getInsertId($sequence);
}