Refactor|Master Server: Server info is now represented with a instances of class ServerInfo
ServerInfo cleans up the old code, replacing the associative arrays with objects. Server properties are still made available with array access semantics (implements ArrayAccess). The difference being that write access to the values is now marshaled by the class API.
With property value writes marshaled, this allows the property array itself to be used when encoding to a JSON representation -- the class can ensure that the property array value types are not inadvertently changed when assigned.
ServerInfo implements a populateGraphTemplate() method which will fills the given array with the properties of the server (which due to the aforementioned write access protection are ensured to be of the correct value type).
Also implemented a simple mechanism for testing JSON responses.
Refactor|Master Server: Server info is now represented with a instances of class ServerInfo
ServerInfo cleans up the old code, replacing the associative arrays
with objects. Server properties are still made available with array
access semantics (implements ArrayAccess). The difference being that
write access to the values is now marshaled by the class API.
With property value writes marshaled, this allows the property array
itself to be used when encoding to a JSON representation -- the class
can ensure that the property array value types are not inadvertently
changed when assigned.
ServerInfo implements a populateGraphTemplate() method which will
fills the given array with the properties of the server (which due
to the aforementioned write access protection are ensured to be of
the correct value type).
Also implemented a simple mechanism for testing JSON responses.