lib/Doctrine/DBAL/Connection.php
public function resolveParams(array $params, array $types)
    {
        $resolvedParams = [];

        // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO.
        if (is_int(key($params))) {
            // Positional parameters
            $typeOffset = array_key_exists(0, $types) ? -1 : 0;
            $bindIndex  = 1;
            foreach ($params as $value) {
                $typeIndex = $bindIndex + $typeOffset;
                if (isset($types[$typeIndex])) {
                    $type                       = $types[$typeIndex];
                    [$value]                    = $this->getBindingInfo($value, $type);
                    $resolvedParams[$bindIndex] = $value;
                } else {
                    $resolvedParams[$bindIndex] = $value;
                }
                ++$bindIndex;
            }
        } else {
            // Named parameters
            foreach ($params as $name => $value) {
                if (isset($types[$name])) {
                    $type                  = $types[$name];
                    [$value]               = $this->getBindingInfo($value, $type);
                    $resolvedParams[$name] = $value;
                } else {
                    $resolvedParams[$name] = $value;
                }
            }
        }

        return $resolvedParams;
    }
public function resolveParams(array $params, array $types)
    {
        $resolvedParams = [];

        // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO.
        if (is_int(key($params))) {
            // Positional parameters
            $typeOffset = array_key_exists(0, $types) ? -1 : 0;
            $bindIndex  = 1;
            foreach ($params as $value) {
                $typeIndex = $bindIndex + $typeOffset;
                if (isset($types[$typeIndex])) {
                    $type                       = $types[$typeIndex];
                    [$value]                    = $this->getBindingInfo($value, $type);
                    $resolvedParams[$bindIndex] = $value;
                } else {
                    $resolvedParams[$bindIndex] = $value;
                }
                ++$bindIndex;
            }
        } else {
            // Named parameters
            foreach ($params as $name => $value) {
                if (isset($types[$name])) {
                    $type                  = $types[$name];
                    [$value]               = $this->getBindingInfo($value, $type);
                    $resolvedParams[$name] = $value;
                } else {
                    $resolvedParams[$name] = $value;
                }
            }
        }

        return $resolvedParams;
    }
public function resolveParams ( array $ params , array $ types ) { $ resolvedParams = [ ] ; // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO. if ( is_int ( key ( $ params ) ) ) { // Positional parameters $ typeOffset = array_key_exists ( 0 , $ types ) ? - 1 : 0 ; $ bindIndex = 1 ; foreach ( $ params as $ value ) { $ typeIndex = $ bindIndex + $ typeOffset ; if ( isset ( $ types [ $ typeIndex ] ) ) { $ type = $ types [ $ typeIndex ] ; [ $ value ] = $ this -> getBindingInfo ( $ value , $ type ) ; $ resolvedParams [ $ bindIndex ] = $ value ; } else { $ resolvedParams [ $ bindIndex ] = $ value ; } ++ $ bindIndex ; } } else { // Named parameters foreach ( $ params as $ name => $ value ) { if ( isset ( $ types [ $ name ] ) ) { $ type = $ types [ $ name ] ; [ $ value ] = $ this -> getBindingInfo ( $ value , $ type ) ; $ resolvedParams [ $ name ] = $ value ; } else { $ resolvedParams [ $ name ] = $ value ; } } } return $ resolvedParams ; }
Resolves the parameters to a format which can be displayed.

@internal This is a purely internal method. If you rely on this method, you are advised to
copy/paste the code as this method may change, or be removed without prior notice.

@param mixed[]        $params
@param int[]|string[] $types

@return mixed[]
Resolves the parameters to a format which can be displayed .