src/Utilities/Miscellaneous.php
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;
    }
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;
    }
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 ; }
Quotes given value with apostrophes or quotation marks

@param mixed $value         The value to quote
@param bool  $useApostrophe (optional) If is set to true, apostrophes are used. Otherwise - quotation marks.
@return string
Quotes given value with apostrophes or quotation marks