The php_array_data model allows you to maintain data much like a spreadsheet while the result of stowing the data is a PHP class that can be called to retrieve the data. As an example, consider the following specification showing the abbreviated province codes and tax rates for the Canadian province codes and territories.
Here we show one of the methods by which you could programmatically fetch a cell from this table.
require_once SITE_CLASS_PATH.'array_data/provinces.php'; $prov = new provinces(); $ontario_rate = $prov->get_value('Ontario','tax_rate');
Another common situation involves referencing information throughout the site that is subject to change. In such situations you would like to be able to define this information in one place and refer to it throughout the site. This way, if the information does change you can just update it centrally and the update with ripple throughout the site.
The globals model is used for this purpose. Here we show how globals are used to store phone numbers and address data.
Now that these globals have been defined, we can refer to these values from any other specification by using the $globals function as shown here in a bootgrid specification.
Other models that deal with data caching and retrieval include: