@@ -20,14 +20,20 @@ interface UrlGeneratorInterface
2020 * @param array $arguments Argument-value set. Unused arguments will be moved to query parameters, if query
2121 * parameter with such name doesn't exist.
2222 * @param array $queryParameters Parameter-value set.
23+ * @param string|null $hash Hash part (fragment identifier) of the URL.
2324 *
2425 * @throws RouteNotFoundException In case there is no route with the name specified.
2526 *
2627 * @return string URL generated.
2728 *
2829 * @psalm-param UrlArgumentsType $arguments
2930 */
30- public function generate (string $ name , array $ arguments = [], array $ queryParameters = []): string ;
31+ public function generate (
32+ string $ name ,
33+ array $ arguments = [],
34+ array $ queryParameters = [],
35+ ?string $ hash = null ,
36+ ): string ;
3137
3238 /**
3339 * Generates absolute URL from named route, arguments, and query parameters.
@@ -36,6 +42,7 @@ public function generate(string $name, array $arguments = [], array $queryParame
3642 * @param array $arguments Argument-value set. Unused arguments will be moved to query parameters, if query
3743 * parameter with such name doesn't exist.
3844 * @param array $queryParameters Parameter-value set.
45+ * @param string|null $hash Hash part (fragment identifier) of the URL.
3946 * @param string|null $scheme Host scheme.
4047 * @param string|null $host Host for manual setup.
4148 *
@@ -49,6 +56,7 @@ public function generateAbsolute(
4956 string $ name ,
5057 array $ arguments = [],
5158 array $ queryParameters = [],
59+ ?string $ hash = null ,
5260 string $ scheme = null ,
5361 string $ host = null
5462 ): string ;
@@ -59,6 +67,7 @@ public function generateAbsolute(
5967 * @param array $replacedArguments New argument values indexed by replaced argument names. Unused arguments will be
6068 * moved to query parameters, if query parameter with such name doesn't exist.
6169 * @param array $queryParameters Parameter-value set.
70+ * @param string|null $hash Hash part (fragment identifier) of the URL.
6271 * @param string|null $fallbackRouteName Name of a route that should be used if current route.
6372 * can not be determined.
6473 *
@@ -67,6 +76,7 @@ public function generateAbsolute(
6776 public function generateFromCurrent (
6877 array $ replacedArguments ,
6978 array $ queryParameters = [],
79+ ?string $ hash = null ,
7080 ?string $ fallbackRouteName = null
7181 ): string ;
7282
0 commit comments