Class to provide functions to emulate the java.util.Properties class.
This class emulates many of the methods found in the java.util.Properties class. It can be particularily helpful when implementing the server side of AJAX based applications (you can easily build/send a XML document to your client side JavaScript using this class).
Here is an example of creating a simple AJAX style response (in this example, we are simply passing back values for variables "x", "y" and "z" - it's up to the client side JavaScript to do something with the values):
Located in /lib/Properties.php (line 37)
Class | Description |
---|---|
WuiProperties | Class to provide functions to emulate the java.util.Properties class. |
Update header information such that the client won't cache results.
Get value from POST/GET (regardless of whether its a POST/GET).
Constructs instance of object (with no properties).
Get the key/value pairs as a associative array.
Gets property value.
Read the entire set of properties from a properties XML file.
This function reads the entire set of properties from a properties XML document and add the key/value pairs to the object.
Prints the entire set of properties as JSON (see renderJSON).
Prints the entire set of properties as a XML document.
Removes a key/value pair from the set of properties.
Renders the contents of the Properties object to a HTTP client as JSON.
THIS method is useful when one is using the Properties object to serve information back to a HTTP client (typically a JavaScript function running within a user's web browser). In general it works in the following manner:
NOTE: When using this function, the values in the properties table can contain ANY characters. However, the keys must ALL be LEGAL JavaScript attribute names. Think:
// 'key' must be legal JavaScript // 'value' can be anything as we apply the necessary escape/unescape var O = new Object(); o.key = unescape(value);
Renders the contents of the Properties object to a HTTP client.
THIS method is useful when one is using the Properties object to serve information back to a HTTP client (typically a JavaScript function running within a user's web browser). In general it works in the following manner:
Sets comment to associate with set of properties.
Add the stndard set of NST properties to identify the XML content.
This function adds the standard set of NST properties used to help identify the XML content. This includes the fields:
<dl> <dt>document_source</dt><dd>String listing tools used to generate XML content.</dd> <dt>document_version</dt><dd>A document version identifier having the form: NNNN.rrr. For example: 2130.011 indicates NST v2.13.0 and XML document release 11. NOTE: You can only specify the release integer portion (the major portion is fixed based on the build).</dd> <dt>create_time_formatted</dt><dd>A formatted time stamp.</dd> <dt>create_time_secs</dt><dd>The timestamp as a numeric seconds value.</dd> </dl>
Sets whether or not the XSL style sheet: /nstwui/cgi-bin/xsl/properties2html.xsl is included in the output.
Sets property value.
Returns the number of key/value pairs in the properties objects.
Stores the entire set of properties as a XML document.
This function writes the entire set of properties as a XML document to the file specified.
Forms a single string that can be put after the '?' in a URL.
This method allows one to create a single string in the form that can be appended after the '?' when building a URL (the 'search' component of 'window.location').
Documentation generated on Sun, 11 Feb 2018 07:41:02 -0500 by phpDocumentor 1.4.4