1
0
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:
David Grudl
2017-09-07 20:45:21 +02:00
parent 0af64b5f9b
commit 6c147f2ea5
2 changed files with 8 additions and 14 deletions

View File

@@ -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);
}

View File

@@ -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);
}