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'
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'