diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index 9ed6292ca..3ad6e6e0b 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -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(); diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index a51c89e46..b9fdf98f5 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -164,7 +164,7 @@ class EntityManager */ public function getTransaction() { - return $this->_transaction; + return $this->_transaction; } /** diff --git a/lib/Doctrine/ORM/EntityTransaction.php b/lib/Doctrine/ORM/EntityTransaction.php index 1257d0939..40bcd8a13 100644 --- a/lib/Doctrine/ORM/EntityTransaction.php +++ b/lib/Doctrine/ORM/EntityTransaction.php @@ -158,6 +158,6 @@ final class EntityTransaction */ public function isRollbackOnly() { - return $this->_conn->getRollbackOnly(); + return $this->_conn->isRollbackOnly(); } } \ No newline at end of file