Public Member Functions | |
parse ($file, $src) | |
generateCode ($func_name) | |
toString () | |
_initRoot () | |
_push (&$tag) | |
_pushChild (&$tag) | |
_pop () | |
_outputMode ($mode=false) | |
onElementStart ($name, $attributes) | |
extendZptBlockAttributes ($domain, $attributes) | |
onElementData ($data) | |
onSpecific ($data) | |
onElementClose ($name) | |
_raiseAttributeNotFound ($att, $class) | |
_raiseUnknownAttribute ($att) | |
_raiseUnexpectedTagClosure ($name) | |
_raiseNoTagExpected ($name) | |
_raiseAttConflict ($a2, $a1) | |
Static Public Member Functions | |
TemplateAttributes ($attrs) | |
OrderTemplateAttributes (&$phptal) | |
Public Attributes | |
$_root | |
$_headers = false | |
$_started = false | |
$_docType | |
$_inDocType | |
$_current | |
$_file | |
$_outputFormat = PHPTAL_XHTML | |
$_keepXMLNS = false |
This object implements PHPTAL_XML_Parser interface and will accept only well formed xml templates.
Parser object has two aims :
Once this job is accomplished, the parser object should be destroyed and MUST NOT be used to parse another template. It's a one time and drop object.
Note about code generation :
The final source code is ready to write into a php file.
The code generation process requires a function name which should represent the template unique id (Template class makes an md5 over the source file path to create this id).
Definition at line 86 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php.
|
Initialize root node. private Definition at line 175 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. Referenced by parse(). |
|
Definition at line 229 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _outputMode(). Referenced by _outputMode(). |
|
Pop the last node (go up a level in tree). private Definition at line 212 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. Referenced by onElementClose(). |
|
Push a node as the current one.
Definition at line 189 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _push(). Referenced by _push(). |
|
Push a node into the current one.
Definition at line 202 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _pushChild(). Referenced by _pushChild(). |
|
Definition at line 488 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _raiseAttConflict(). Referenced by _raiseAttConflict(), and OrderTemplateAttributes(). |
|
Definition at line 452 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _raiseAttributeNotFound(). Referenced by _raiseAttributeNotFound(), and OrderTemplateAttributes(). |
|
Definition at line 479 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _raiseNoTagExpected(). Referenced by _raiseNoTagExpected(), and onElementClose(). |
|
Definition at line 469 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _raiseUnexpectedTagClosure(), and name. Referenced by _raiseUnexpectedTagClosure(), and onElementClose(). |
|
Definition at line 461 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _raiseUnknownAttribute(). Referenced by _raiseUnknownAttribute(), and TemplateAttributes(). |
|
Extends ZPT attributes withing a *:block element so these attributes can be used by phptal parser. private Definition at line 293 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References $_phptal_dictionary, and extendZptBlockAttributes(). Referenced by extendZptBlockAttributes(), and onElementStart(). |
|
Generate php code. After template parsing, this method must be called to generate php code from the template tree.
Definition at line 138 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References generateCode(). Referenced by generateCode(). |
|
xml callback private Reimplemented from PHPTAL_XML_Parser. Definition at line 345 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _pop(), _raiseNoTagExpected(), _raiseUnexpectedTagClosure(), name, and onElementClose(). Referenced by onElementClose(). |
|
xml callback private Reimplemented from PHPTAL_XML_Parser. Definition at line 311 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References data, and onElementData(). Referenced by onElementData(). |
|
xml callback private Reimplemented from PHPTAL_XML_Parser. Definition at line 246 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References $_phptal_namespaces, extendZptBlockAttributes(), PHPTAL_XML_Parser::getLineNumber(), name, onElementStart(), OrderTemplateAttributes(), and TemplateAttributes(). Referenced by onElementStart(). |
|
xml callback private Reimplemented from PHPTAL_XML_Parser. Definition at line 326 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References data, and onSpecific(). Referenced by onSpecific(). |
|
Order phptal attributes array using $_phptal_rules_order array. 1 private
Definition at line 416 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References $_phptal_dictionary, $_phptal_rules_order, _raiseAttConflict(), _raiseAttributeNotFound(), name, and OrderTemplateAttributes(). Referenced by onElementStart(), and OrderTemplateAttributes(). |
|
Parse a template string.
Definition at line 119 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References _initRoot(), and parse(). Referenced by parse(). |
|
Lookup template attributes in given hashtable. This method separate xml attributes from template attributes and return an array composed of the array of formers and the array of laters. private 1
Definition at line 375 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. References $_phptal_aliases, $_phptal_dictionary, $_phptal_namespaces, _raiseUnknownAttribute(), sns(), and TemplateAttributes(). Referenced by onElementStart(), and TemplateAttributes(). |
|
Return a string representation of the underlying xhtml tree. This method is for debug purpose. private
Definition at line 157 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 98 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 94 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Reimplemented from PHPTAL_XML_Parser. Definition at line 101 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 91 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 95 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 107 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 104 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 89 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |
|
Definition at line 92 of file PHPTAL-NP-0.7.0/libs/PHPTAL/Parser.php. |