Renamed fetchRow to fetchAssoc, as defined in @todo list. Renamed getRollbackOnly to isRollbackOnly, since it is more consistent to its purpose.
This commit is contained in:
parent
b12b8b0041
commit
65fbb9f7a4
@ -310,9 +310,8 @@ class Connection implements DriverConnection
|
||||
* @param string $statement The SQL query.
|
||||
* @param array $params The query parameters.
|
||||
* @return array
|
||||
* @todo Rename: fetchAssoc
|
||||
*/
|
||||
public function fetchRow($statement, array $params = array())
|
||||
public function fetchAssoc($statement, array $params = array())
|
||||
{
|
||||
return $this->executeQuery($statement, $params)->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
@ -583,10 +582,10 @@ class Connection implements DriverConnection
|
||||
* represents a row of the result set.
|
||||
* @return mixed The projected result of the query.
|
||||
*/
|
||||
public function project($query, array $params = array(), Closure $function)
|
||||
public function project($query, array $params, Closure $function)
|
||||
{
|
||||
$result = array();
|
||||
$stmt = $this->executeQuery($query, $params);
|
||||
$stmt = $this->executeQuery($query, $params ?: array());
|
||||
|
||||
while ($row = $stmt->fetch()) {
|
||||
$result[] = $function($row);
|
||||
@ -820,7 +819,7 @@ class Connection implements DriverConnection
|
||||
* @return boolean
|
||||
* @throws ConnectionException If no transaction is active.
|
||||
*/
|
||||
public function getRollbackOnly()
|
||||
public function isRollbackOnly()
|
||||
{
|
||||
if ($this->_transactionNestingLevel == 0) {
|
||||
throw ConnectionException::noActiveTransaction();
|
||||
|
@ -164,7 +164,7 @@ class EntityManager
|
||||
*/
|
||||
public function getTransaction()
|
||||
{
|
||||
return $this->_transaction;
|
||||
return $this->_transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -158,6 +158,6 @@ final class EntityTransaction
|
||||
*/
|
||||
public function isRollbackOnly()
|
||||
{
|
||||
return $this->_conn->getRollbackOnly();
|
||||
return $this->_conn->isRollbackOnly();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user