Simplewiki 1
|
The parser creates a document tree (document object model) consisting of these nodes to debug the contents of a node, use var_dump($node->get_display_list()), which avoids parent and children nodes. More...
Public Member Functions | |
__construct ($type, $parent=NULL) | |
Create new node. | |
get_display_list () | |
For debug: Returns an array of properties, leaving out parent and children properties. | |
Data Fields | |
Types of nodes | |
const | DOCUMENT = 'document' |
Document node. | |
const | TEXT = 'text' |
Text node. | |
const | PARAGRAPH = 'paragraph' |
Paragraph node (<p>). | |
const | HEADING = 'heading' |
Heading node (<h1-6>). | |
const | EMPHASIS = 'emphasis' |
Emphasis node (<em>). | |
const | STRONG = 'strong' |
Strong node (<strong>). | |
const | LINEBREAK = 'linebreak' |
Linebreak node (<br />). | |
const | HORIZONTALRULE = 'horizontalrule' |
Horizontal rule node (<hr />). | |
const | LINK = 'link' |
Link node (<a>). | |
const | IMAGE = 'image' |
Image node (<img />). | |
const | ORDERED_LIST = 'ordered_list' |
Ordered list node (<ol>). | |
const | UNORDERED_LIST = 'unordered_list' |
Unordered list node (<ul>). | |
const | LIST_ITEM = 'list_item' |
List item node (<li>). | |
const | DEF_LIST = 'def_list' |
Definition list node (<dl>). | |
const | DEF_TERM = 'def_term' |
Definition term node (<dt>). | |
const | DEF_DESC = 'def_desc' |
Definition description node (<dd>). | |
const | TABLE = 'table' |
Table node (<table>). | |
const | TABLE_ROW = 'table_row' |
Table row node (<tr>). | |
const | TABLE_HEADCELL = 'table_headcell' |
Table headcell node (<th>). | |
const | TABLE_CELL = 'table_cell' |
Table data cell node (<td>). | |
const | SPAN = 'span' |
Span node (<span>). | |
const | BLOCKDIVIDER = 'blockdivider' |
Blockdivider node (<div></div>). | |
const | CODE = 'code' |
Code node (<code>). | |
const | PREFORMATTED = 'preformatted' |
Preformatted node (<pre>). | |
const | BLOCKDEF = 'blockdef' |
Blockdef node (various). | |
const | MACRO = 'macro' |
Macro definition. | |
Standard node properties | |
$parent | |
A parent node in the document tree. | |
$children | |
array of child nodes - used to emit content | |
$type | |
holds the type of node - See constants for types | |
Protected Member Functions | |
child_append ($child) | |
Add child to children list. |
The parser creates a document tree (document object model) consisting of these nodes to debug the contents of a node, use var_dump($node->get_display_list()), which avoids parent and children nodes.
Definition at line 14 of file muster_simplewiki_docnode.php.
__construct | ( | $ | type, |
$ | parent = NULL |
||
) |
Create new node.
initialized children array, sets type and parent, and adds to parent children list.
string | $type | selected from one of the class constants |
object | $parent | the parent of the node. |
Definition at line 351 of file muster_simplewiki_docnode.php.
child_append | ( | $ | child | ) | [protected] |
Add child to children list.
Children emit output as content for the current node.
object | $child |
Definition at line 363 of file muster_simplewiki_docnode.php.
get_display_list | ( | ) |
For debug: Returns an array of properties, leaving out parent and children properties.
Definition at line 369 of file muster_simplewiki_docnode.php.
$children |
array of child nodes - used to emit content
Definition at line 341 of file muster_simplewiki_docnode.php.
$parent |
A parent node in the document tree.
Definition at line 339 of file muster_simplewiki_docnode.php.
$type |
holds the type of node - See constants for types
Definition at line 343 of file muster_simplewiki_docnode.php.
const BLOCKDEF = 'blockdef' |
Blockdef node (various).
Parsed properties: blocktag, decoration
Added by node emitter: knowntag (can be over-ridden by blockdef handler)
Added by node emitter: opentag_head = "\n<$blocktag", opentag_tail = "/>", closetag = "\n</$blocktag>", elementcontent set by child nodes, unless set by blockdef handler. dl... blocktags changed to xmlns form (dl:tag); unknown blocktag returns markup text.
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 320 of file muster_simplewiki_docnode.php.
const BLOCKDIVIDER = 'blockdivider' |
Blockdivider node (<div></div>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<div", opentag_tail = "/>", closetag = "\n</div>", elementcontent = ''
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 277 of file muster_simplewiki_docnode.php.
const CODE = 'code' |
Code node (<code>).
Parsed properties: textcontent, decoration
Added by node emitter: opentag_head = "\n<code", opentag_tail = "/>", closetag = "\n</code>", elementcontent = textcontent (encoded if escapecontent)
escapecontent = TRUE, may get altered by callout
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 291 of file muster_simplewiki_docnode.php.
const DEF_DESC = 'def_desc' |
Definition description node (<dd>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<dd", opentag_tail = "/>", closetag = "\n</dd>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 207 of file muster_simplewiki_docnode.php.
const DEF_LIST = 'def_list' |
Definition list node (<dl>).
Parsed properties: level, decoration
Added by node emitter: opentag_head = "\n<dl", opentag_tail = "/>", closetag = "\n</dl>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 183 of file muster_simplewiki_docnode.php.
const DEF_TERM = 'def_term' |
Definition term node (<dt>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<dt", opentag_tail = "/>", closetag = "\n</dt>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 195 of file muster_simplewiki_docnode.php.
const DOCUMENT = 'document' |
Document node.
The root node. No parsed properties
Added by node emitter: opentag_head = '', closetag = '', elementcontent set from child emitters
Definition at line 23 of file muster_simplewiki_docnode.php.
const EMPHASIS = 'emphasis' |
Emphasis node (<em>).
No parsed properties.
Definition at line 69 of file muster_simplewiki_docnode.php.
const HEADING = 'heading' |
Heading node (<h1-6>).
Parsed properties: level, decoration
Added by prepare_node: attributes from decoration, classes, properties as styles
Added by node emitter: opentag_head = "\n<h" + level, opentag_tail = ">", closetag = "</h" + level + ">", elementcontent set from child emitters
Definition at line 60 of file muster_simplewiki_docnode.php.
const HORIZONTALRULE = 'horizontalrule' |
Horizontal rule node (<hr />).
No parsed properties
Definition at line 93 of file muster_simplewiki_docnode.php.
const IMAGE = 'image' |
Image node (<img />).
Parsed properties: target, title, decoration
Added by node emitter: linkparts->internaladdress, linkparts->symlink, linkparts->internalselector, linkparts->externaladdress, linkparts->externalprotocol, linkparts->externalselector, linkparts->rawlink, linkparts->rawlinkaddress
Added by node emitter: opentag_head = "\n<img", opentag_tail = "/>", caption set from child emitters
Added by registered symlinks: linkparts->symlinkpath (or must be added by registered symlink handler)
Added by prepare_image_node: attributes from decoration, classes, properties as styles
Definition at line 135 of file muster_simplewiki_docnode.php.
const LINEBREAK = 'linebreak' |
Linebreak node (<br />).
No parsed properties
Definition at line 85 of file muster_simplewiki_docnode.php.
const LINK = 'link' |
Link node (<a>).
Parsed properties: target, title, decoration
Added by node emitter: linkparts->anchor, linkparts->internaladdress, linkparts->symlink, linkparts->internalselector, linkparts->internalversion, linkparts->symlinkpath (set by handlers), linkparts->externaladdress, linkparts->externalprotocol, linkparts->externalselector, linkparts->rawlink, linkparts->rawlinkaddress (set by handlers)
Added by node emitter: opentag_head = "\n<a", opentag_tail = ">", closetag = "</a>", caption set from child emitters
Added by node emitter: unknown = FALSE; set to TRUE if link doesn't parse, and symlink/rawlink handlers absent. If set to true, causes link to appear underlined and appended with superscript "?"
caption set by target if both caption and linkparts->anchor are empty
Added by registered symlinks: linkparts->symlinkpath (or must be added by registered symlink handler)
Added by registered rawlink handler: linkparts->rawlinkaddress
elementcontent set by caption
Added by prepare_link_node: linkparts->anchor ("#" stripped out if linkparts->anchor is set, and caption is empty)
Definition at line 118 of file muster_simplewiki_docnode.php.
const LIST_ITEM = 'list_item' |
List item node (<li>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<li", opentag_tail = "/>", closetag = "\n</li>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 171 of file muster_simplewiki_docnode.php.
const MACRO = 'macro' |
Macro definition.
parsed properties: macroname, textcontent, decoration.
added by node emitter: processed. Automatically set to TRUE if a macro processor found, otherwise set to false for internal processing control (error).
added by macro: output. If output is not set, caption is used for text output if available.
Definition at line 334 of file muster_simplewiki_docnode.php.
const ORDERED_LIST = 'ordered_list' |
Ordered list node (<ol>).
Parsed properties: level, decoration ($rules->list)
Added by node emitter: opentag_head = "\n<ol", opentag_tail = "/>", closetag = "\n</ol>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 147 of file muster_simplewiki_docnode.php.
const PARAGRAPH = 'paragraph' |
Paragraph node (<p>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<p", opentag_tail = ">", closetag = "</p>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 47 of file muster_simplewiki_docnode.php.
const PREFORMATTED = 'preformatted' |
Preformatted node (<pre>).
Parsed properties: textcontent, decoration
Added by node emitter: opentag_head = "\n<pre", opentag_tail = "/>", closetag = "\n</pre>", elementcontent = textcontent (encoded if escapecontent)
escapecontent = TRUE, may get altered by callout
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 305 of file muster_simplewiki_docnode.php.
const SPAN = 'span' |
Span node (<span>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<span", opentag_tail = "/>", closetag = "\n</span>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 265 of file muster_simplewiki_docnode.php.
const STRONG = 'strong' |
Strong node (<strong>).
No parsed properties
Definition at line 77 of file muster_simplewiki_docnode.php.
const TABLE = 'table' |
Table node (<table>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<table", opentag_tail = "/>", closetag = "\n</table>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 219 of file muster_simplewiki_docnode.php.
const TABLE_CELL = 'table_cell' |
Table data cell node (<td>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<td", opentag_tail = "/>", closetag = "\n</td>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 253 of file muster_simplewiki_docnode.php.
const TABLE_HEADCELL = 'table_headcell' |
Table headcell node (<th>).
Parsed properties: decoration
Added by node emitter: opentag_head = "\n<tr", opentag_tail = "/>", closetag = "\n</tr>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 241 of file muster_simplewiki_docnode.php.
const TABLE_ROW = 'table_row' |
Table row node (<tr>).
Parsed properties: decoration
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 229 of file muster_simplewiki_docnode.php.
const TEXT = 'text' |
Text node.
No html markup.
Parsed properties: textcontent
Definition at line 34 of file muster_simplewiki_docnode.php.
const UNORDERED_LIST = 'unordered_list' |
Unordered list node (<ul>).
Parsed properties: level, decoration
Added by node emitter: opentag_head = "\n<ul", opentag_tail = "/>", closetag = "\n</ul>", elementcontent set from child emitters
Added by prepare_node: attributes from decoration, classes, properties as styles
Definition at line 159 of file muster_simplewiki_docnode.php.