protected function Subscriber::_urlEncode in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber.php \Zend\Feed\PubSubHubbub\Subscriber::_urlEncode()
URL Encode an array of parameters
Parameters
array $params:
Return value
array
1 call to Subscriber::_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
File
- vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber.php, line 787
Class
Namespace
Zend\Feed\PubSubHubbubCode
protected function _urlEncode(array $params) {
$encoded = [];
foreach ($params as $key => $value) {
if (is_array($value)) {
$ekey = PubSubHubbub::urlencode($key);
$encoded[$ekey] = [];
foreach ($value as $duplicateKey) {
$encoded[$ekey][] = PubSubHubbub::urlencode($duplicateKey);
}
}
else {
$encoded[PubSubHubbub::urlencode($key)] = PubSubHubbub::urlencode($value);
}
}
return $encoded;
}