Partiall revert bfc54b7e

Refactor Url->getParams() to return an instance of UrlParam instead of an array.

fixes #6760
This commit is contained in:
Matthias Jentsch 2014-07-21 09:19:44 +02:00
parent 5ea02b41ea
commit 091ddbe552
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/**

View File

@ -310,7 +310,7 @@ class UrlParams
}
}
public function asArray()
public function toArray()
{
return $this->params;
}

View File

@ -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;