Class goog.Uri.QueryData
code »Class used to represent URI query parameters. It is essentially a hash of name-value pairs, though a name can be present more than once. Has the same interface as the collections in goog.structs.
Constructor
Parameters |
---|
Instance Methods
code »add ( key, value ) ⇒ !goog.Uri.QueryData
Adds a key value pair.
!goog.Uri.QueryData
Parameters |
---|
|
Returns |
|
code »clone ( ) ⇒ !goog.Uri.QueryData
Clone the query data instance.
!goog.Uri.QueryData
Returns |
---|
|
code »containsKey ( key ) ⇒ boolean
Whether there is a parameter with the given name
boolean
Parameters |
---|
|
Returns |
|
code »containsValue ( value ) ⇒ boolean
Whether there is a parameter with the given value.
boolean
Parameters |
---|
|
Returns |
|
If the underlying key map is not yet initialized, it parses the
query string and fills the map with parsed data.
Extends a query data object with another query data or map like object. This
operates 'in-place', it does not create a new QueryData object.
Parameters |
---|
|
code »filterKeys ( keys ) ⇒ !goog.Uri.QueryData
Removes all keys that are not in the provided list. (Modifies this object.)
!goog.Uri.QueryData
Returns the first value associated with the key. If the query data has no
such key this will return undefined or the optional default.
Parameters |
---|
|
Returns |
|
code »getKeyName_ ( arg ) ⇒ string
Helper function to get the key name from a JavaScript object. Converts
the object to a string, and to lower case if necessary.
string
Parameters |
---|
|
Returns |
|
Returns all the values of the parameters with the given name. If the query
data has no such key this will return an empty array. If no key is given
all values wil be returned.
Parameters |
---|
|
Returns |
|
Invalidate the cache.
code »set ( key, value ) ⇒ !goog.Uri.QueryData
Sets a key value pair and removes all other keys with the same value.
!goog.Uri.QueryData
Parameters |
---|
|
Returns |
|
code »setIgnoreCase ( ignoreCase )Ignore case in parameter names.
NOTE: If there are already key/value pairs in the QueryData, and
ignoreCase_ is set to false, the keys will all be lower-cased.
Parameters |
---|
|
code »toDecodedString ( ) ⇒ string
string
Returns |
---|
|
Instance Properties
Encoded query string, or null if it requires computing from the key map.
If true, ignore the case of the parameter name in #get.
The map containing name/value or name/array-of-values pairs.
May be null if it requires parsing from the query string.
We need to use a Map because we cannot guarantee that the key names will
not be problematic for IE.
Static Functions
code »goog.Uri.QueryData.createFromKeysValues ( keys, values, opt_uri, opt_ignoreCase ) ⇒ !goog.Uri.QueryData
Creates a new query data instance from parallel arrays of parameter names
and values. Allows for duplicate parameter names. Throws an error if the
lengths of the arrays differ.
!goog.Uri.QueryData
code »goog.Uri.QueryData.createFromMap ( map, opt_uri, opt_ignoreCase ) ⇒ !goog.Uri.QueryData
Creates a new query data instance from a map of names and values.
!goog.Uri.QueryData
Parameters |
---|
|
Returns |
|