You are here

protected function Subscriber::_toByteValueOrderedString in Zircon Profile 8.0

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

Order outgoing parameters

Parameters

array $params:

Return value

array

1 call to Subscriber::_toByteValueOrderedString()
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 812

Class

Subscriber

Namespace

Zend\Feed\PubSubHubbub

Code

protected function _toByteValueOrderedString(array $params) {
  $return = [];
  uksort($params, 'strnatcmp');
  foreach ($params as $key => $value) {
    if (is_array($value)) {
      foreach ($value as $keyduplicate) {
        $return[] = $key . '=' . $keyduplicate;
      }
    }
    else {
      $return[] = $key . '=' . $value;
    }
  }
  return implode('&', $return);
}