Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit 67b293b

Browse files
committed
Add support for query parameters, fragment and options
1 parent e7a8449 commit 67b293b

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/UrlHelper.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,24 @@ public function __construct(BaseHelper $helper)
2828
/**
2929
* Proxies to `Zend\Expressive\Helper\UrlHelper::generate()`
3030
*
31-
* @param string $route
32-
* @param array $params
31+
* @param string $routeName
32+
* @param array $routeParams
33+
* @param array $queryParams
34+
* @param string $fragmentIdentifier
35+
* @param array $options Can have the following keys:
36+
* - router (array): contains options to be passed to the router
37+
* - reuse_result_params (bool): indicates if the current RouteResult
38+
* parameters will be used, defaults to true
39+
*
3340
* @return string
3441
*/
35-
public function __invoke($route = null, $params = [])
36-
{
37-
return $this->helper->generate($route, $params);
42+
public function __invoke(
43+
$routeName = null,
44+
array $routeParams = [],
45+
array $queryParams = [],
46+
$fragmentIdentifier = '',
47+
array $options = []
48+
) {
49+
return $this->helper->generate($routeName, $routeParams, $queryParams, $fragmentIdentifier, $options);
3850
}
3951
}

0 commit comments

Comments
 (0)