Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UrlInterface->withQueryParameter() #98

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/UriInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,23 @@ public function withPath($path);
* @throws \InvalidArgumentException for invalid query strings.
*/
public function withQuery($query);

/**
* Return an instance with the specified query parameter added to existing query string.
*
* This method MUST retain the state of the current instance, and return
* an instance that contains the specified query string.
*
* Users can provide both encoded and decoded query characters.
* Implementations ensure the correct encoding as outlined in getQuery().
*
* A null query parameter value is equivalent to removing the query parameter.
*
* @param string $name The query parameter to use with the new instance.
* @param string|null $value Value of the query parameter.
* @return static A new instance with the specified query parameter.
*/
public function withQueryParameter($name, $value);

/**
* Return an instance with the specified URI fragment.
Expand Down