You are here

public static function PubSubHubbub::urlencode in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/PubSubHubbub/PubSubHubbub.php \Zend\Feed\PubSubHubbub\PubSubHubbub::urlencode()

RFC 3986 safe url encoding method

Parameters

string $string:

Return value

string

2 calls to PubSubHubbub::urlencode()
Subscriber::_getRequestParameters in vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber.php
Return a list of standard protocol/optional parameters for addition to client's POST body that are specific to the current Hub Server URL
Subscriber::_urlEncode in vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber.php
URL Encode an array of parameters

File

vendor/zendframework/zend-feed/src/PubSubHubbub/PubSubHubbub.php, line 140

Class

PubSubHubbub

Namespace

Zend\Feed\PubSubHubbub

Code

public static function urlencode($string) {
  $escaper = static::getEscaper();
  $rawencoded = $escaper
    ->escapeUrl($string);
  $rfcencoded = str_replace('%7E', '~', $rawencoded);
  return $rfcencoded;
}