Class StringParser_BBCode_Node_Element

Description

BBCode String parser element node class

Located in /stringparser_bbcode.class.php (line 1471)

StringParser_Node
   |
   --StringParser_BBCode_Node_Element
Variable Summary
Method Summary
 void appendToAttribute (string $name, string $chars)
 void appendToName (string $chars)
 void attribute (string $name)
 object &duplicate ()
 mixed getFlag (string $flag, [string $type = 'mixed'], [mixed $default = null])
 string getReplacement (string $subcontent)
 bool hadCloseTag ()
 mixed &lastChildIfText ()
 bool matchesCriterium (string $criterium, mixed $value)
 string name ()
 void setAttribute (string $name, string $value)
 void setCodeInfo (array $info)
 void setFlag (string $name, mixed $value)
 void setHadCloseTag ()
 void setName (string $name)
 bool validate ([string $action = 'validate'])
 string _dumpToString ()
Variables
array $_attributes = array () (line 1508)

Element attributes

  • access: protected
array $_flags = array () (line 1500)

Element flags

  • access: protected
bool $_hadCloseTag = false (line 1516)

Had a close tag

  • access: protected
string $_name = '' (line 1492)

Element name

  • see: StringParser_BBCode_Node_Element::appendToName
  • see: StringParser_BBCode_Node_Element::setName
  • see: StringParser_BBCode_Node_Element::name
  • access: protected
bool $_paragraphHandled = false (line 1524)

Was processed by paragraph handling

  • access: protected
int $_type = STRINGPARSER_BBCODE_NODE_ELEMENT (line 1481)

The type of this node.

This node is a bbcode element node.


Redefinition of:
StringParser_Node::$_type
The type of this node.

Inherited Variables

Inherited from StringParser_Node

StringParser_Node::$occurredAt
StringParser_Node::$_children
StringParser_Node::$_id
StringParser_Node::$_parent
Methods
appendToAttribute (line 1584)

Append to attribute of this element

  • access: public
void appendToAttribute (string $name, string $chars)
  • string $name: The name of the attribute
  • string $chars: The chars to append to the attribute of the element
appendToName (line 1572)

Append to name of this element

  • access: public
void appendToName (string $chars)
  • string $chars: The chars to append to the name of the element
attribute (line 1623)

Get attribute value

  • access: public
void attribute (string $name)
  • string $name: The name of the attribute
duplicate (line 1534)

Duplicate this node (but without children / parents)

  • access: public
object &duplicate ()
findNextAdjentTextNode (line 1757)

Find next adjent text node after close tag

returns the node or null if none exists

  • access: public
mixed &findNextAdjentTextNode ()
findPrevAdjentTextNode (line 1797)

Find previous adjent text node before open tag

returns the node or null if none exists

  • access: public
mixed &findPrevAdjentTextNode ()
firstChildIfText (line 1708)

Get first child if it is a text node

  • access: public
mixed &firstChildIfText ()
getFlag (line 1854)

Get Flag

  • access: public
mixed getFlag (string $flag, [string $type = 'mixed'], [mixed $default = null])
  • string $flag: The requested flag
  • string $type: The requested type of the return value
  • mixed $default: The default return value
getReplacement (line 1931)

Get replacement for this code

  • access: public
string getReplacement (string $subcontent)
  • string $subcontent: The content of all sub-nodes
hadCloseTag (line 1664)

Get flag if this element had a close tag

  • access: public
bool hadCloseTag ()
lastChildIfText (line 1728)

Get last child if it is a text node AND if this element had a close tag

  • access: public
mixed &lastChildIfText ()
matchesCriterium (line 1676)

Determines whether a criterium matches this node

  • return: True if this node matches that criterium
  • access: public
bool matchesCriterium (string $criterium, mixed $value)
  • string $criterium: The criterium that is to be checked
  • mixed $value: The value that is to be compared

Redefinition of:
StringParser_Node::matchesCriterium()
Determines whether a criterium matches this node
name (line 1551)

Retreive name of this element

  • access: public
string name ()
paragraphHandled (line 1654)

Get flag if this element was already processed by paragraph handling

  • access: public
bool paragraphHandled ()
setAttribute (line 1600)

Set attribute

  • access: public
void setAttribute (string $name, string $value)
  • string $name: The name of the attribute
  • string $value: The new value of the attribute
setCodeInfo (line 1611)

Set code info

  • access: public
void setCodeInfo (array $info)
  • array $info: The code info array
setFlag (line 1872)

Set a flag

  • access: public
void setFlag (string $name, mixed $value)
  • string $name: The name of the flag
  • mixed $value: The value of the flag
setHadCloseTag (line 1635)

Set flag that this element had a close tag

  • access: public
void setHadCloseTag ()
setName (line 1561)

Set name of this element

  • access: public
void setName (string $name)
  • string $name: The new name of the element
setParagraphHandled (line 1644)

Set flag that this element was already processed by paragraph handling

  • access: public
void setParagraphHandled ()
validate (line 1886)

Validate code

  • access: public
bool validate ([string $action = 'validate'])
  • string $action: The action which is to be called ('validate' for first validation, 'validate_again' for second validation (optional))
_dumpToString (line 1957)

Dump this node to a string

  • access: protected
string _dumpToString ()

Redefinition of:
StringParser_Node::_dumpToString()
Dump this node to a string
_findPrevAdjentTextNodeHelper (line 1832)

Helper function for findPrevAdjentTextNode

Looks at the last child node; if it's a text node, it returns it, if the element node did not have an open tag, it calls itself recursively.

void &_findPrevAdjentTextNodeHelper ()

Inherited Methods

Inherited From StringParser_Node

 StringParser_Node::StringParser_Node()
 StringParser_Node::appendChild()
 StringParser_Node::appendToLastTextChild()
 StringParser_Node::destroyNode()
 StringParser_Node::dump()
 StringParser_Node::equals()
 StringParser_Node::firstChild()
 StringParser_Node::getNodeCountByCriterium()
 StringParser_Node::getNodesByCriterium()
 StringParser_Node::insertChildAfter()
 StringParser_Node::insertChildBefore()
 StringParser_Node::lastChild()
 StringParser_Node::matchesCriterium()
 StringParser_Node::prependChild()
 StringParser_Node::removeChild()
 StringParser_Node::type()
 StringParser_Node::_destroy()
 StringParser_Node::_dumpToString()
 StringParser_Node::_findChild()

Documentation generated on Mon, 10 Dec 2007 13:29:49 +0100 by phpDocumentor 1.4.0