MediaWiki
master
|
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) |
Definition at line 23 of file XmlTypeCheck.php.
XmlTypeCheck::__construct | ( | $ | file, |
$ | filterCallback = null |
||
) |
$file | string filename |
$filterCallback | callable (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.
XmlTypeCheck::elementOpen | ( | $ | parser, |
$ | name, | ||
$ | attribs | ||
) | [private] |
$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
Definition at line 60 of file XmlTypeCheck.php.
XmlTypeCheck::rootElementOpen | ( | $ | parser, |
$ | name, | ||
$ | attribs | ||
) | [private] |
$parser | |
$name | |
$attribs |
Definition at line 103 of file XmlTypeCheck.php.
References $attribs, $name, $parser, array(), and elementOpen().
XmlTypeCheck::run | ( | $ | fname | ) | [private] |
$fname |
Definition at line 67 of file XmlTypeCheck.php.
References $file, $fname, $parser, $ret, and array().
Referenced by __construct().
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.