Example #1
0
 /**
  * Decode a query string
  *
  * @param string $query
  * @return array
  */
 public function decode($query) : array
 {
     foreach (explode("&", $query) as $keyValuePair) {
         list($key, $value) = $this->decodePair($keyValuePair);
         $this->values->addValue($key, $value);
     }
     return $this->values->getValues();
 }