diff --git a/src/UrlGeneratorInterface.php b/src/UrlGeneratorInterface.php index 4d88df2..e3a2376 100644 --- a/src/UrlGeneratorInterface.php +++ b/src/UrlGeneratorInterface.php @@ -19,6 +19,12 @@ interface UrlGeneratorInterface * $path = $generator->relative('foo', ['param1' => 'value1']); * // '/foo/value1' * + * Any parameters that does not directly belong + * to the route will appear in the query string: + * + * $path = $generator->relative('foo', ['param1' => 'value1', ['bar' => '123']); + * // '/foo/value1?bar=123' + * * @param string $route Route name * @param array $parameters Route parameters * @@ -48,6 +54,11 @@ public function relative(string $route, array $parameters = []): string; * $url = $generator->absolute('foo', ['param1' => 'value1']); * // 'https://localhost:9999/foo/value1' * + * Any parameters that does not directly belong + * to the route will appear in the query string: + * + * $path = $generator->absolute('foo', ['param1' => 'value1', ['bar' => '123']); + * // 'https://localhost:9999/foo/value1?bar=123' * * @param string $route Route name * @param array $parameters Route parameters