private static function rewriteParameterAndType(
        array $parameters,
        array $types,
        $parameter,
        array $newPlaceholders
    ) {
        // Extract the fridge type.
        $type = static::extractType($types[$parameter]);

        // Iterate new placeholders to rewrite each one.
        foreach ($newPlaceholders as $newPlaceholderIndex => $newPlaceholder) {

            // Determine the new parameter.
            $newParameter = substr($newPlaceholder, 1);

            // Rewrites parameters and types.
            $parameters[$newParameter] = $parameters[$parameter][$newPlaceholderIndex];
            $types[$newParameter] = $type;
        }

        // Remove rewritten parameter and type.
        unset($parameters[$parameter]);
        unset($types[$parameter]);

        return array($parameters, $types);
    }
private static function rewriteParameterAndType(
        array $parameters,
        array $types,
        $parameter,
        array $newPlaceholders
    ) {
        // Extract the fridge type.
        $type = static::extractType($types[$parameter]);

        // Iterate new placeholders to rewrite each one.
        foreach ($newPlaceholders as $newPlaceholderIndex => $newPlaceholder) {

            // Determine the new parameter.
            $newParameter = substr($newPlaceholder, 1);

            // Rewrites parameters and types.
            $parameters[$newParameter] = $parameters[$parameter][$newPlaceholderIndex];
            $types[$newParameter] = $type;
        }

        // Remove rewritten parameter and type.
        unset($parameters[$parameter]);
        unset($types[$parameter]);

        return array($parameters, $types);
    }
private static function rewriteParameterAndType ( array $ parameters , array $ types , $ parameter , array $ newPlaceholders ) { // Extract the fridge type. $ type = static :: extractType ( $ types [ $ parameter ] ) ; // Iterate new placeholders to rewrite each one. foreach ( $ newPlaceholders as $ newPlaceholderIndex => $ newPlaceholder ) { // Determine the new parameter. $ newParameter = substr ( $ newPlaceholder , 1 ) ; // Rewrites parameters and types. $ parameters [ $ newParameter ] = $ parameters [ $ parameter ] [ $ newPlaceholderIndex ] ; $ types [ $ newParameter ] = $ type ; } // Remove rewritten parameter and type. unset ( $ parameters [ $ parameter ] ) ; unset ( $ types [ $ parameter ] ) ; return array ( $ parameters , $ types ) ; }
Rewrites the query parameter & type by expanding them according to the parameter and the new placeholders.

Example:
- parameters:
- parameters: array('foo' => array(1, 3, 5))
- types: array('foo' => 'integer[]')
- parameter: foo
- newPlaceholders: array(':foo1', ':foo2', ':foo3')
- result:
- rewrittenParameters: array('foo1' => 1, 'foo2' => 3, 'foo3' => 5)
- rewrittenTypes: array('foo1' => 'integer', 'foo2' => 'integer', 'foo3' => 'integer')

@param array  $parameters      The query parameters.
@param array  $types           The query types.
@param string $parameter       The query parameter to rewrite.
@param array  $newPlaceholders The new placeholders.

@return array 0 => The rewritten parameters, 1 => The rewritten types.
Rewrites the query parameter & type by expanding them according to the parameter and the new placeholders .