OAuthSimple::_oauthEscape PHP Method

_oauthEscape() private static method

private static _oauthEscape ( $string )
    private static function _oauthEscape($string)
    {
        if ($string === 0) {
            return 0;
        }
        if ($string == '0') {
            return '0';
        }
        if (strlen($string) == 0) {
            return '';
        }
        if (is_array($string)) {
            throw new OAuthSimpleException('Array passed to _oauthEscape');
        }
        $string = urlencode($string);
        //FIX: urlencode of ~ and '+'
        $string = str_replace(array('%7E', '+'), array('~', '%20'), $string);
        return $string;
    }