mirror of
https://github.com/dg/dibi.git
synced 2025-08-07 14:46:50 +02:00
Connection, dibi: deprecated insertId() & affectedRows()
This commit is contained in:
@@ -342,12 +342,11 @@ class Connection
|
||||
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows. Alias for getAffectedRows().
|
||||
* @return int number of rows
|
||||
* @throws Exception
|
||||
* @deprecated
|
||||
*/
|
||||
public function affectedRows()
|
||||
{
|
||||
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
|
||||
return $this->getAffectedRows();
|
||||
}
|
||||
|
||||
@@ -370,13 +369,11 @@ class Connection
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
||||
* @param string optional sequence name
|
||||
* @return int
|
||||
* @throws Exception
|
||||
* @deprecated
|
||||
*/
|
||||
public function insertId($sequence = null)
|
||||
{
|
||||
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
|
||||
return $this->getInsertId($sequence);
|
||||
}
|
||||
|
||||
|
@@ -277,12 +277,11 @@ class dibi
|
||||
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows. Alias for getAffectedRows().
|
||||
* @return int number of rows
|
||||
* @throws Dibi\Exception
|
||||
* @deprecated
|
||||
*/
|
||||
public static function affectedRows()
|
||||
{
|
||||
trigger_error(__METHOD__ . '() is deprecated, use getAffectedRows()', E_USER_DEPRECATED);
|
||||
return self::getConnection()->getAffectedRows();
|
||||
}
|
||||
|
||||
@@ -301,13 +300,11 @@ class dibi
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
||||
* @param string optional sequence name
|
||||
* @return int
|
||||
* @throws Dibi\Exception
|
||||
* @deprecated
|
||||
*/
|
||||
public static function insertId($sequence = null)
|
||||
{
|
||||
trigger_error(__METHOD__ . '() is deprecated, use getInsertId()', E_USER_DEPRECATED);
|
||||
return self::getConnection()->getInsertId($sequence);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user