src/Query/Interpolator.php
public static function interpolate(string $query, array $parameters = []): string
    {
        if (empty($parameters)) {
            return $query;
        }

        //Flattening
        $parameters = self::flattenParameters($parameters);

        //Let's prepare values so they looks better
        foreach ($parameters as $index => $parameter) {
            $value = self::resolveValue($parameter);

            if (is_numeric($index)) {
                $query = self::replaceOnce('?', $value, $query);
            } else {
                $query = str_replace($index, $value, $query);
            }
        }


        return $query;
    }
public static function interpolate(string $query, array $parameters = []): string
    {
        if (empty($parameters)) {
            return $query;
        }

        //Flattening
        $parameters = self::flattenParameters($parameters);

        //Let's prepare values so they looks better
        foreach ($parameters as $index => $parameter) {
            $value = self::resolveValue($parameter);

            if (is_numeric($index)) {
                $query = self::replaceOnce('?', $value, $query);
            } else {
                $query = str_replace($index, $value, $query);
            }
        }


        return $query;
    }
public static function interpolate ( string $ query , array $ parameters = [ ] ) : string { if ( empty ( $ parameters ) ) { return $ query ; } //Flattening $ parameters = self :: flattenParameters ( $ parameters ) ; //Let's prepare values so they looks better foreach ( $ parameters as $ index => $ parameter ) { $ value = self :: resolveValue ( $ parameter ) ; if ( is_numeric ( $ index ) ) { $ query = self :: replaceOnce ( '?' , $ value , $ query ) ; } else { $ query = str_replace ( $ index , $ value , $ query ) ; } } return $ query ; }
Helper method used to interpolate SQL query with set of parameters, must be used only for
development purposes and never for real query!

@param string               $query
@param ParameterInterface[] $parameters Parameters to be binded into query. Named list are supported.
@return string
Helper method used to interpolate SQL query with set of parameters must be used only for development purposes and never for real query!