NOCL_Orderlicious_API
(Concept - Properties - Functions)
Version: 1.0 (Versions)
Location: cl_objects.php
Orderlicious API contains the data model and loads it..
Concept
This class sits at the top of the page data model and contains all the elements that make up the restaurant data. If you're after some sort of live data, you're getting it from this Orderlicious AP.
On instantiation, can be set with an element type and ID, which can be loaded as the parent instead of the default parent.
Properties
-
-
- $data
- (Public) A public facing alias for $childObj. - $elTypRef
- (Public) The Element Type Reference class loaded once and referenced by all children. - $childObj
- (Private) The first and top element in this model. usually a restaurant.
- $data
-
Functions
__construct()
Version: 1.0
Called when class is instantiated
Usage:
$api = new NOCL_Orderlicious_API( [ $elementType [, $elementID ] ] );
Paramenters:
-
-
-
-
- $elementType
- (Optional) The ID of the Element type of this object to open. Defaults to a Restaurant if left out. - $elementID
- (Optional) The ID of the Element to load as top parent. Defaults to 1 and can be ommitted.
- $elementType
-
-
-
Returns:
Silently after setting property values internally. Actually, returns this class as an object.
Process:
-
-
-
-
- Instantiate a new NOCL_Element_Types and place it in $this->elTypRef
- Work out the Class to use for the top Element by running the $elementType through the Element Type Reference
- Set $this->childObj as a new Element class to load, as determined by the previous step, and load it with the record number in $elementID
- Link $this->data to $this->childObj
- Set the parent object value of the top element.
- Set the $elTypRef property of the top element.
- Instantiate a new NOCL_Element_Types and place it in $this->elTypRef
-
-
-