Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • CommaAggregator
  • DuplicateAggregator
  • PhpAggregator

Interfaces

  • QueryAggregatorInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo
 1: <?php
 2: 
 3: namespace Guzzle\Http\QueryAggregator;
 4: 
 5: use Guzzle\Http\QueryString;
 6: 
 7: /**
 8:  * Does not aggregate nested query string values and allows duplicates in the resulting array
 9:  *
10:  * Example: http://test.com?q=1&q=2
11:  */
12: class DuplicateAggregator implements QueryAggregatorInterface
13: {
14:     /**
15:      * {@inheritdoc}
16:      */
17:     public function aggregate($key, $value, QueryString $query)
18:     {
19:         if ($query->isUrlEncoding()) {
20:             return array($query->encodeValue($key) => array_map(array($query, 'encodeValue'), $value));
21:         } else {
22:             return array($key => $value);
23:         }
24:     }
25: }
26: 
php-coveralls API documentation generated by ApiGen 2.8.0