protected function Callback::_parseQueryString in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber/Callback.php \Zend\Feed\PubSubHubbub\Subscriber\Callback::_parseQueryString()
Build an array of Query String parameters. This bypasses $_GET which munges parameter names and cannot accept multiple parameters with the same key.
Return value
array|void
1 call to Callback::_parseQueryString()
- Callback::_detectVerifyTokenKey in vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber/ Callback.php - Attempt to detect the verification token key. This would be passed in the Callback URL (which we are handling with this class!) as a URI path part (the last part by convention).
File
- vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber/ Callback.php, line 289
Class
Namespace
Zend\Feed\PubSubHubbub\SubscriberCode
protected function _parseQueryString() {
$params = [];
$queryString = '';
if (isset($_SERVER['QUERY_STRING'])) {
$queryString = $_SERVER['QUERY_STRING'];
}
if (empty($queryString)) {
return [];
}
$parts = explode('&', $queryString);
foreach ($parts as $kvpair) {
$pair = explode('=', $kvpair);
$key = rawurldecode($pair[0]);
$value = rawurldecode($pair[1]);
if (isset($params[$key])) {
if (is_array($params[$key])) {
$params[$key][] = $value;
}
else {
$params[$key] = [
$params[$key],
$value,
];
}
}
else {
$params[$key] = $value;
}
}
return $params;
}