irJSONParser Class Reference
JSON parsing class. More...
Public Member Functions | |
| __construct ($content) | |
| Constructor. It takes the irJSON file content as input. | |
| __destruct () | |
Data Fields | |
| $instanceRecords = array() | |
| Array of instance record objects of the parsed irJSON file. | |
| $linkageSchemas = array() | |
| Array of Linkage Schema objects of the parsed irJSON file. | |
| $structureSchemas = array() | |
| Array of Structure Schema objects of the parsed irJSON file. | |
| $dataset | |
| Dataset object of the parsed irJSON file. | |
| $jsonErrors = array() | |
| JSON Parsing errors. | |
| $irjsonErrors = array() | |
| irJSON Parsing errors | |
| $irjsonNotices = array() | |
| irJSON Parsing notices | |
Private Member Functions | |
| parse () | |
| Parser function that parse the JSON file to populate the irJSON objects. | |
| validateAttributeType (&$instanceRecord, $attribute) | |
| Validate an attribute type based on the structure schema linked to the dataset. | |
| listTypes ($types) | |
| List all types of a types list and seperate each item with a comma. | |
Private Attributes | |
| $jsonContent = "" | |
| irJSON content file to be parsed | |
| $irvStructureSchema | |
| Default Structure Schema used by the irJSON Parser. | |
Detailed Description
JSON parsing class.
Definition at line 27 of file irJSONParser.php.
Constructor & Destructor Documentation
| __construct | ( | $ | content | ) |
Constructor. It takes the irJSON file content as input.
- Parameters:
-
[in] $content irJSON file content
Definition at line 196 of file irJSONParser.php.
References parse().

| __destruct | ( | ) |
Definition at line 239 of file irJSONParser.php.
Member Function Documentation
| listTypes | ( | $ | types | ) | [private] |
List all types of a types list and seperate each item with a comma.
- Parameters:
-
[in] $types An array of type names
Definition at line 917 of file irJSONParser.php.
References $types.
| parse | ( | ) | [private] |
Parser function that parse the JSON file to populate the irJSON objects.
Definition at line 249 of file irJSONParser.php.
Referenced by __construct().
| validateAttributeType | ( | &$ | instanceRecord, | |
| $ | attribute | |||
| ) | [private] |
Validate an attribute type based on the structure schema linked to the dataset.
- Parameters:
-
[in] $instanceRecord Instance record to validate [in] $attribute Attribute name to validate
Definition at line 841 of file irJSONParser.php.
Field Documentation
| $dataset |
Dataset object of the parsed irJSON file.
Definition at line 39 of file irJSONParser.php.
| $instanceRecords = array() |
Array of instance record objects of the parsed irJSON file.
Definition at line 30 of file irJSONParser.php.
| $irjsonErrors = array() |
irJSON Parsing errors
Definition at line 45 of file irJSONParser.php.
| $irjsonNotices = array() |
irJSON Parsing notices
Definition at line 48 of file irJSONParser.php.
$irvStructureSchema [private] |
Default Structure Schema used by the irJSON Parser.
Definition at line 54 of file irJSONParser.php.
$jsonContent = "" [private] |
irJSON content file to be parsed
Definition at line 51 of file irJSONParser.php.
| $jsonErrors = array() |
JSON Parsing errors.
Definition at line 42 of file irJSONParser.php.
| $linkageSchemas = array() |
Array of Linkage Schema objects of the parsed irJSON file.
Definition at line 33 of file irJSONParser.php.
| $structureSchemas = array() |
Array of Structure Schema objects of the parsed irJSON file.
Definition at line 36 of file irJSONParser.php.
The documentation for this class was generated from the following file:
