Commit f4f92aee authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-301' into 2.3

parents 659de9a1 b75d8633
...@@ -56,7 +56,7 @@ class DB2Statement implements \IteratorAggregate, Statement ...@@ -56,7 +56,7 @@ class DB2Statement implements \IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function bindParam($column, &$variable, $type = null) public function bindParam($column, &$variable, $type = null, $length = null)
{ {
$this->_bindParam[$column] =& $variable; $this->_bindParam[$column] =& $variable;
......
...@@ -86,7 +86,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -86,7 +86,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function bindParam($column, &$variable, $type = null) public function bindParam($column, &$variable, $type = null, $length = null)
{ {
if (null === $type) { if (null === $type) {
$type = 's'; $type = 's';
......
...@@ -106,13 +106,13 @@ class OCI8Statement implements \IteratorAggregate, Statement ...@@ -106,13 +106,13 @@ class OCI8Statement implements \IteratorAggregate, Statement
*/ */
public function bindValue($param, $value, $type = null) public function bindValue($param, $value, $type = null)
{ {
return $this->bindParam($param, $value, $type); return $this->bindParam($param, $value, $type, null);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function bindParam($column, &$variable, $type = null) public function bindParam($column, &$variable, $type = null,$length = null)
{ {
$column = isset($this->_paramMap[$column]) ? $this->_paramMap[$column] : $column; $column = isset($this->_paramMap[$column]) ? $this->_paramMap[$column] : $column;
......
...@@ -102,13 +102,13 @@ class SQLSrvStatement implements IteratorAggregate, Statement ...@@ -102,13 +102,13 @@ class SQLSrvStatement implements IteratorAggregate, Statement
public function bindValue($param, $value, $type = null) public function bindValue($param, $value, $type = null)
{ {
return $this->bindParam($param, $value, $type); return $this->bindParam($param, $value, $type,null);
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function bindParam($column, &$variable, $type = null) public function bindParam($column, &$variable, $type = null, $length = null)
{ {
if (!is_numeric($column)) { if (!is_numeric($column)) {
throw new SQLSrvException("sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead."); throw new SQLSrvException("sqlsrv does not support named parameters to queries, use question mark (?) placeholders instead.");
......
...@@ -70,9 +70,10 @@ interface Statement extends ResultStatement ...@@ -70,9 +70,10 @@ interface Statement extends ResultStatement
* @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants. To return * @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants. To return
* an INOUT parameter from a stored procedure, use the bitwise OR operator to set the * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the
* PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter. * PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter.
* @param integer $length You must specify maxlength when using an OUT bind so that PHP allocates enough memory to hold the returned value.
* @return boolean Returns TRUE on success or FALSE on failure. * @return boolean Returns TRUE on success or FALSE on failure.
*/ */
function bindParam($column, &$variable, $type = null); function bindParam($column, &$variable, $type = null, $length = null);
/** /**
* errorCode * errorCode
......
...@@ -66,7 +66,7 @@ class Statement implements \IteratorAggregate, \Doctrine\DBAL\Driver\Statement ...@@ -66,7 +66,7 @@ class Statement implements \IteratorAggregate, \Doctrine\DBAL\Driver\Statement
$this->case = $conn->getFetchCase(); $this->case = $conn->getFetchCase();
} }
public function bindParam($column, &$variable, $type = null) public function bindParam($column, &$variable, $type = null,$length = null)
{ {
return $this->stmt->bindParam($column, $variable, $type); return $this->stmt->bindParam($column, $variable, $type);
} }
......
...@@ -116,9 +116,9 @@ class Statement implements \IteratorAggregate, DriverStatement ...@@ -116,9 +116,9 @@ class Statement implements \IteratorAggregate, DriverStatement
* @param integer $type The PDO binding type. * @param integer $type The PDO binding type.
* @return boolean TRUE on success, FALSE on failure. * @return boolean TRUE on success, FALSE on failure.
*/ */
public function bindParam($name, &$var, $type = PDO::PARAM_STR) public function bindParam($name, &$var, $type = PDO::PARAM_STR, $length = null)
{ {
return $this->stmt->bindParam($name, $var, $type); return $this->stmt->bindParam($name, $var, $type, $length );
} }
/** /**
......
Subproject commit 15b04ec520ccded3dc0eba65b12a69ff1931360f Subproject commit e0bb65229e6dfc1f012a0eef9e23016308652e46
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