Partiall revert bfc54b7e
Refactor Url->getParams() to return an instance of UrlParam instead of an array. fixes #6760
This commit is contained in:
parent
5ea02b41ea
commit
091ddbe552
|
@ -331,11 +331,11 @@ class Url
|
|||
/**
|
||||
* Return all parameters that will be used in the query part
|
||||
*
|
||||
* @return array An associative key => value array containing all parameters
|
||||
* @return UrlParams An instance of UrlParam containing all parameters
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->params->asArray();
|
||||
return $this->params;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -310,7 +310,7 @@ class UrlParams
|
|||
}
|
||||
}
|
||||
|
||||
public function asArray()
|
||||
public function toArray()
|
||||
{
|
||||
return $this->params;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ EOD;
|
|||
public function toArray()
|
||||
{
|
||||
$array = array('url' => $this->url->getPath());
|
||||
foreach ($this->url->getParams() as $param) {
|
||||
foreach ($this->url->getParams()->toArray() as $param) {
|
||||
$array[$param[0]] = $param[1];
|
||||
}
|
||||
return $array;
|
||||
|
|
Loading…
Reference in New Issue