WonderPush PHP library
  • Namespace
  • Class
Navigation
  • Namespace
  • Class
Namespaces
  • WonderPush
    • Api
    • Errors
    • Net
    • Obj
    • Params
    • Util
Classes
  • ArrayUtil
  • DefaultLogger
  • JsonSerializable
  • StringUtil
  • TimeUnit
  • TimeUtil
  • TimeValue
  • UrlUtil
Interfaces
  • Logger

Class UrlUtil

Utility class for URL manipulation.

Namespace: WonderPush\Util
Located at Util/UrlUtil.php

Methods summary

public static parseQueryString( string|null|string[] $queryString ) : string[]

Parses a query string into an associative array.

Parses a query string into an associative array.

PHP syntax and duplicated arguments are not supported (foo[bar]=, foo[]=, etc.).

Parameters

$queryString

Returns

string[]
String parameter values by parameter name.

Throws

InvalidArgumentException
public static replaceQueryStringInUrl( string $url, string|array $newQueryString ) : string

Returns a new URL with the desired query string in lieu of the original one, if any.

Returns a new URL with the desired query string in lieu of the original one, if any.

Parameters

$url
The original URL to replace the query string from.
$newQueryString
The new query string to use.

Returns

string
The modified URL with a new query string.
WonderPush PHP library API documentation generated by ApiGen