Moodle  2.2.1
http://www.collinsharper.com
xmldb_file Class Reference

This class represents an entire XMLDB file. More...

Inheritance diagram for xmldb_file:
Collaboration diagram for xmldb_file:

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

Detailed Description

This class represents an entire XMLDB file.

Definition at line 29 of file xmldb_file.php.


Constructor & Destructor Documentation

__construct ( path)

Constructor of the xmldb_file

Reimplemented from xmldb_object.

Definition at line 39 of file xmldb_file.php.


Member Function Documentation

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.

Here is the caller graph for this function:

Determine if the XML file exists

Definition at line 48 of file xmldb_file.php.

Here is the caller graph for this function:

Determine if the XML is writeable

Definition at line 58 of file xmldb_file.php.

& getStructure ( )

Definition at line 65 of file xmldb_file.php.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

This function saves the whole xmldb_structure to its file

Definition at line 179 of file xmldb_file.php.

Here is the call graph for this function:

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.

Here is the caller graph for this function:


Field Documentation

$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.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations