Skip to content

Commit

Permalink
Added a note about query string parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
franzose committed Aug 13, 2019
1 parent ccc15fb commit b16afa0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/UrlGeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b16afa0

Please sign in to comment.