Commit 0348953f authored by Steve Müller's avatar Steve Müller Committed by GitHub

Merge pull request #2432 from kimhemsoe/remove_call_user__dbal_connection

Removed nearly all call_user_* from core( not drivers )
parents b3ffe1db acacc990
...@@ -923,17 +923,7 @@ class Connection implements DriverConnection ...@@ -923,17 +923,7 @@ class Connection implements DriverConnection
} }
try { try {
switch (func_num_args()) { $statement = $this->_conn->query(...$args);
case 1:
$statement = $this->_conn->query($args[0]);
break;
case 2:
$statement = $this->_conn->query($args[0], $args[1]);
break;
default:
$statement = call_user_func_array(array($this->_conn, 'query'), $args);
break;
}
} catch (Exception $ex) { } catch (Exception $ex) {
throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $args[0]); throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $args[0]);
} }
......
...@@ -368,8 +368,8 @@ class MasterSlaveConnection extends Connection ...@@ -368,8 +368,8 @@ class MasterSlaveConnection extends Connection
if ($logger) { if ($logger) {
$logger->startQuery($args[0]); $logger->startQuery($args[0]);
} }
$statement = call_user_func_array(array($this->_conn, 'query'), $args); $statement = $this->_conn->query(...$args);
if ($logger) { if ($logger) {
$logger->stopQuery(); $logger->stopQuery();
......
...@@ -141,7 +141,7 @@ class Connection extends \Doctrine\DBAL\Connection ...@@ -141,7 +141,7 @@ class Connection extends \Doctrine\DBAL\Connection
{ {
$this->connect(); $this->connect();
$stmt = call_user_func_array(array($this->_conn, 'query'), func_get_args()); $stmt = $this->_conn->query(...func_get_args());
$stmt = new Statement($stmt, $this); $stmt = new Statement($stmt, $this);
$stmt->setFetchMode($this->defaultFetchMode); $stmt->setFetchMode($this->defaultFetchMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment