lib/Doctrine/DBAL/Query/QueryBuilder.php
public function setParameters(array $params, array $types = [])
    {
        $this->paramTypes = $types;
        $this->params     = $params;

        return $this;
    }
public function setParameters(array $params, array $types = [])
    {
        $this->paramTypes = $types;
        $this->params     = $params;

        return $this;
    }
public function setParameters ( array $ params , array $ types = [ ] ) { $ this -> paramTypes = $ types ; $ this -> params = $ params ; return $ this ; }
Sets a collection of query parameters for the query being constructed.

<code>
$qb = $conn->createQueryBuilder()
->select('u')
->from('users', 'u')
->where('u.id = :user_id1 OR u.id = :user_id2')
->setParameters(array(
':user_id1' => 1,
':user_id2' => 2
));
</code>

@param mixed[]        $params The query parameters to set.
@param int[]|string[] $types  The query parameters types to set.

@return $this This QueryBuilder instance.
Sets a collection of query parameters for the query being constructed .