|
Moodle
2.2.1
http://www.collinsharper.com
|
This class represents an entire XMLDB file. More...


Public Member Functions | |
| __construct ($path) | |
| fileExists () | |
| fileWriteable () | |
| & | getStructure () |
| validateXMLStructure () | |
| loadXMLStructure () | |
| arr2xmldb_structure ($xmlarr) | |
| setDTD ($path) | |
| setSchema ($path) | |
| saveXMLFile () | |
Data Fields | |
| $path | |
| $schema | |
| $dtd | |
| $xmldb_structure | |
This class represents an entire XMLDB file.
Definition at line 29 of file xmldb_file.php.
| __construct | ( | $ | path | ) |
Constructor of the xmldb_file
Reimplemented from xmldb_object.
Definition at line 39 of file xmldb_file.php.
| arr2xmldb_structure | ( | $ | xmlarr | ) |
This function takes an xmlized array and put it into one xmldb_structure
Definition at line 156 of file xmldb_file.php.

| fileExists | ( | ) |
Determine if the XML file exists
Definition at line 48 of file xmldb_file.php.

| fileWriteable | ( | ) |
Determine if the XML is writeable
Definition at line 58 of file xmldb_file.php.
| & getStructure | ( | ) |
| loadXMLStructure | ( | ) |
Load and the XMLDB structure from file
Let's validate the XML file
File exists, so let's process it Load everything to a big array
Convert array to xmldb structure
Analize results
Definition at line 125 of file xmldb_file.php.

| saveXMLFile | ( | ) |
This function saves the whole xmldb_structure to its file
Definition at line 179 of file xmldb_file.php.

| setDTD | ( | $ | path | ) |
This function sets the DTD of the XML file
Definition at line 165 of file xmldb_file.php.
| setSchema | ( | $ | path | ) |
This function sets the schema of the XML file
Definition at line 172 of file xmldb_file.php.
This function will check/validate the XML file for correctness Dynamically if will use the best available checker/validator (expat syntax checker or DOM schema validator
Create and load XML file
Only validate if we have a schema
Check for errors
Prepare errors
Create one structure to store errors
Add errors to structure
Add structure to file
Check has failed
Definition at line 74 of file xmldb_file.php.

| $dtd |
Definition at line 33 of file xmldb_file.php.
| $path |
Definition at line 31 of file xmldb_file.php.
| $schema |
Definition at line 32 of file xmldb_file.php.
Definition at line 34 of file xmldb_file.php.