public static function pregQuote($values, $delimiter = null)
    {
        if (!is_array($values)) {
            return preg_quote($values, $delimiter);
        }

        // Case: needle is array
        foreach ($values as $key => $value) {
            $values[$key] = preg_quote($value, $delimiter);
        }

        return implode('|', $values);
    }