Public Member Functions | Public Attributes

HTMLNode Class Reference

List of all members.

Public Member Functions

 __construct ($node)
 __get ($name)
 __set ($name, $value)
 add_class ($newclass)
 remove_class ($removeclass)
 remove ()
 append_html ($html)
 promote_children ()
 get ()
 inner_html ()

Public Attributes

 $node

Detailed Description

Definition at line 162 of file htmldoc.php.


Constructor & Destructor Documentation

HTMLNode::__construct ( node  ) 

Constructor for this node

Parameters:
\DOMNode $node The actual node we're trying to access

Definition at line 171 of file htmldoc.php.


Member Function Documentation

HTMLNode::__get ( name  ) 

Get the value of an attribute of this node

Parameters:
string $name The name of the attribute value to obtain
Returns:
mixed The value of the attribute

Definition at line 181 of file htmldoc.php.

HTMLNode::__set ( name,
value 
)

Set the value of an attribute on this node

Parameters:
string $name The name of the attribute to set
mixed $value The value of the parameter

Definition at line 200 of file htmldoc.php.

HTMLNode::add_class ( newclass  ) 

Add a class to the class attribute of this node

Parameters:
string|array $newclass The class or classes to add to this node

Definition at line 218 of file htmldoc.php.

HTMLNode::append_html ( html  ) 

Append HTML as a child of this node

Parameters:
string $html The HTML to add, which is subsequently parsed into DOMNodes

Definition at line 254 of file htmldoc.php.

HTMLNode::get (  ) 

Get this node's string representation

Returns:
string The node's string representation

Definition at line 277 of file htmldoc.php.

HTMLNode::inner_html (  ) 

Get the HTML of all child elements of this node

Returns:
string The requested HTML

Definition at line 286 of file htmldoc.php.

HTMLNode::promote_children (  ) 

Move the children of this node into this node's parent, just before this node in the DOM tree

Definition at line 264 of file htmldoc.php.

HTMLNode::remove (  ) 

Remove this node from the DOM

Definition at line 245 of file htmldoc.php.

HTMLNode::remove_class ( removeclass  ) 

Remove a class from this node

Parameters:
string|array $removeclass The class or classes to remove from this node

Definition at line 232 of file htmldoc.php.


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