URL Arguments Library
This library is created to help coding when values of URL are required.
- Source:
Methods
(static) getCurrentFile()
Returns the current filename.
- Source:
Returns:
string Current filename.
(static) getParameterArray() → {object}
Returns an object which is equal to the PHPs magic $_GET array.
- Source:
- To Do:
-
- Remove this method in v1.5 of JS Engine.
Returns:
Contains the current URL parameters.
- Type
- object
(static) getUrlParameters(url) → {object}
Returns all URL parameters from the provided URL.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | (optional) The URL to be parsed. If not provided the current location will be used. |
- Source:
Returns:
Returns an object that contains the parameters in key-value pairs.
- Type
- object
(static) replaceParameterValue(url, parameter, value) → {string}
Replaces a specific parameter value inside an URL.
Parameters:
Name | Type | Description |
---|---|---|
url |
The URL containing the parameter. |
|
parameter |
The parameter name to be replaced. |
|
value |
The new value of the parameter. |
- Source:
Returns:
Returns the updated URL string.
- Type
- string