public static function bindParams($command, array $params)
    {
        $wrappers = array();
        $converters = array();
        foreach ($params as $key => $value) {

            // Escaped
            $wrappers[] = '{' . $key . '}';
            $converters[] = escapeshellarg(is_array($value) ? implode(' ', $value) : $value);

            // Unescaped
            $wrappers[] = '{!' . $key . '!}';
            $converters[] = is_array($value) ? implode(' ', $value) : $value;
        }

        return str_replace($wrappers, $converters, $command);
    }
public static function bindParams($command, array $params)
    {
        $wrappers = array();
        $converters = array();
        foreach ($params as $key => $value) {

            // Escaped
            $wrappers[] = '{' . $key . '}';
            $converters[] = escapeshellarg(is_array($value) ? implode(' ', $value) : $value);

            // Unescaped
            $wrappers[] = '{!' . $key . '!}';
            $converters[] = is_array($value) ? implode(' ', $value) : $value;
        }

        return str_replace($wrappers, $converters, $command);
    }
public static function bindParams ( $ command , array $ params ) { $ wrappers = array ( ) ; $ converters = array ( ) ; foreach ( $ params as $ key => $ value ) { // Escaped $ wrappers [ ] = '{' . $ key . '}' ; $ converters [ ] = escapeshellarg ( is_array ( $ value ) ? implode ( ' ' , $ value ) : $ value ) ; // Unescaped $ wrappers [ ] = '{!' . $ key . '!}' ; $ converters [ ] = is_array ( $ value ) ? implode ( ' ' , $ value ) : $ value ; } return str_replace ( $ wrappers , $ converters , $ command ) ; }
Bind params to command.

@param string $command
@param array  $params

@return string
Bind params to command .