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:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user