public static function quoteValue($value, $useApostrophe = true)
    {
        if (is_string($value)) {
            $quotes = '"';

            if ($useApostrophe) {
                $quotes = '\'';
            }

            $value = sprintf('%s%s%s', $quotes, $value, $quotes);
        }

        return $value;
    }