This class provides a means to produce an XML element that is XHTML conformant. As such it provides methods to manage element attributes as well as providing for an element name.
Objects created from this class are session safe, meaning that they can be serialised and unserialised without loosing state.
Definition at line 101 of file controls.php.
Public Member Functions | |
XHTMLElement ($name) | |
The XHTMLElement constructor. | |
getElementName () | |
Get the element name. | |
getAttribute ($name) | |
Get an attribute value. | |
setAttribute ($name, $value) | |
Set an attribute. | |
setBooleanAttribute ($name, $state) | |
Set a boolean attribute. | |
hasAttribute ($name) | |
Check whether an attribute exists. | |
removeAttribute ($name) | |
Remove an attribute. | |
toXHTML () | |
Serialise the object to an XHTML string. | |
toString () | |
Get a human readable string representation of the element. | |
__sleep () | |
Prepare object for serialisation. | |
__wakeup () | |
Initialise object after unserialisation. | |
Public Attributes | |
$dom_document | |
A DOM XML document with which to create elements. | |
$node | |
The DOM XML node representing the current element. | |
$serialise | |
A string to which the node is serialised as XML when the object is serialised. |
|
The XHTMLElement constructor.
Definition at line 114 of file controls.php. |
|
Prepare object for serialisation. This method is automatically called just before the object is serialised to carry out clean-up operations. See the PHP documentation at http://www.php.net/manual/en/language.oop.magic-functions.php for more information.
Reimplemented in ControlElement, EnhancedImageInput, Option, CheckedInput, and SelectElement. Definition at line 221 of file controls.php. |
|
Initialise object after unserialisation. This method is automatically called just after the object is unserialised and ensures it is properly initialised. See the PHP documentation at http://www.php.net/manual/en/language.oop.magic-functions.php for more information.
Reimplemented in ControlElement, FileInput, and SelectElement. Definition at line 236 of file controls.php. |
|
Get an attribute value.
Definition at line 135 of file controls.php. |
|
Get the element name.
Definition at line 125 of file controls.php. |
|
Check whether an attribute exists.
Definition at line 170 of file controls.php. |
|
Remove an attribute.
Definition at line 180 of file controls.php. |
|
Set an attribute.
Reimplemented in SelectElement. Definition at line 146 of file controls.php. |
|
Set a boolean attribute.
Definition at line 157 of file controls.php. |
|
Get a human readable string representation of the element.
Reimplemented in CheckedInput, CheckboxInput, and MultipleSelect. Definition at line 203 of file controls.php. |
|
Serialise the object to an XHTML string.
Reimplemented in SelectElement. Definition at line 189 of file controls.php. |
|
A DOM XML document with which to create elements.
Definition at line 104 of file controls.php. |
|
The DOM XML node representing the current element.
Definition at line 106 of file controls.php. |
|
A string to which the node is serialised as XML when the object is serialised.
Definition at line 108 of file controls.php. |