mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
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 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()
|
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;
|
return $this->params;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ EOD;
|
|||||||
public function toArray()
|
public function toArray()
|
||||||
{
|
{
|
||||||
$array = array('url' => $this->url->getPath());
|
$array = array('url' => $this->url->getPath());
|
||||||
foreach ($this->url->getParams() as $param) {
|
foreach ($this->url->getParams()->toArray() as $param) {
|
||||||
$array[$param[0]] = $param[1];
|
$array[$param[0]] = $param[1];
|
||||||
}
|
}
|
||||||
return $array;
|
return $array;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user