mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-16 18:34:26 +02:00
parent
201c24107d
commit
f91892cb80
@ -385,6 +385,23 @@ class Url
|
|||||||
return $this->params->shift($param, $default);
|
return $this->params->shift($param, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the given URL matches this URL object
|
||||||
|
*
|
||||||
|
* This does an exact match, parameters MUST be in the same order
|
||||||
|
*
|
||||||
|
* @param Url|string $url the URL to compare against
|
||||||
|
*
|
||||||
|
* @return bool whether the URL matches
|
||||||
|
*/
|
||||||
|
public function matches($url)
|
||||||
|
{
|
||||||
|
if (! $url instanceof Url) {
|
||||||
|
$url = Url::fromPath($url);
|
||||||
|
}
|
||||||
|
return (string) $url === (string) $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a copy of this url without the parameter given
|
* Return a copy of this url without the parameter given
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user