Version: v0.8.1 - Beta.  We welcome contributors & feedback.

UrlQuery.keep

keep($listOfParams) -> self

Description

Remove all key/value pairs from the query that are not in $listOfParams.

$query = url'/page?a=11&b=22&c=33'.getQuery()

$query.keep(['b', 'c'])

print($query.renderString())
//= '?b=22&c=33'

See Also