Example Usage

Here is an example of interfacing with our backend using PHP with the SimpleXML extension. This example centers around the District class.

We have three files here which will be described below.

showdistrict.php
This file merges the HTML and data pulled from the PVS API. It's also the controler which initializes the data gathering object
config.php
This file contains the various configuration we will need. Storing things like the auth key and server hostname.
District.php
This file, while remarkably simple is what does the heavy lifting. It contacts the server, retrieves the XML and stores it in a SimpleXML data object

showdistrict.php

config.php

District.php