MediaWiki  master
XmlTypeCheck Class Reference

List of all members.

Public Member Functions

 __construct ($file, $filterCallback=null)
 getRootElement ()
 Get the root element.

Public Attributes

 $filterMatch = false
 Will be set to true if the optional element filter returned a match at some point.
 $rootElement = ''
 Name of the document's root element, including any namespace as an expanded URL.
 $wellFormed = false
 Will be set to true or false to indicate whether the file is well-formed XML.

Private Member Functions

 elementOpen ($parser, $name, $attribs)
 rootElementOpen ($parser, $name, $attribs)
 run ($fname)

Detailed Description

Definition at line 23 of file XmlTypeCheck.php.


Constructor & Destructor Documentation

XmlTypeCheck::__construct ( file,
filterCallback = null 
)
Parameters:
$filestring filename
$filterCallbackcallable (optional) Function to call to do additional custom validity checks from the SAX element handler event. This gives you access to the element namespace, name, and attributes, but not to text contents. Filter should return 'true' to toggle on $this->filterMatch

Definition at line 50 of file XmlTypeCheck.php.

References $file, and run().


Member Function Documentation

XmlTypeCheck::elementOpen ( parser,
name,
attribs 
) [private]
Parameters:
$parser
$name
$attribs

Definition at line 120 of file XmlTypeCheck.php.

References $attribs, and $name.

Referenced by rootElementOpen().

Get the root element.

Simple accessor to $rootElement

Returns:
string

Definition at line 60 of file XmlTypeCheck.php.

XmlTypeCheck::rootElementOpen ( parser,
name,
attribs 
) [private]
Parameters:
$parser
$name
$attribs

Definition at line 103 of file XmlTypeCheck.php.

References $attribs, $name, $parser, array(), and elementOpen().

XmlTypeCheck::run ( fname) [private]
Parameters:
$fname

Definition at line 67 of file XmlTypeCheck.php.

References $file, $fname, $parser, $ret, and array().

Referenced by __construct().


Member Data Documentation

XmlTypeCheck::$filterMatch = false

Will be set to true if the optional element filter returned a match at some point.

Definition at line 34 of file XmlTypeCheck.php.

XmlTypeCheck::$rootElement = ''

Name of the document's root element, including any namespace as an expanded URL.

Definition at line 40 of file XmlTypeCheck.php.

XmlTypeCheck::$wellFormed = false

Will be set to true or false to indicate whether the file is well-formed XML.

Note that this doesn't check schema validity.

Definition at line 28 of file XmlTypeCheck.php.


The documentation for this class was generated from the following file: