XML_MXML
[ class tree: XML_MXML ] [ index: XML_MXML ] [ all elements ]

Class: XML_MXML_Element

Source Location: /XML_MXML-0.3.0/MXML/Element.php

Class Overview


XML/MXML/Element.php


Author(s):

Variables

Methods


Child classes:

XML_MXML_Styles_CSSStyleDeclaration
XML/MXML/Styles/CSSStyleDeclaration.php
XML_MXML_Validators_Validator
XML/MXML/Validators/Validator.php
XML_MXML_Core_UIObject
XML/MXML/Core/UIObject.php
XML_MXML_Core_Repeater
XML/MXML/Core/Repeater.php
XML_MXML_Compiler_DataProvider
XML/MXML/Compiler/DataProvider.php
XML_MXML_Compiler_Columns
XML/MXML/Compiler/Columns.php
XML_MXML_Compiler_XML
XML/MXML/Compiler/XML.php
XML_MXML_Compiler_MetaData
XML/MXML/Compiler/MetaData.php
XML_MXML_Compiler_Model
XML/MXML/Compiler/Model.php
XML_MXML_Compiler_Object
XML/MXML/Compiler/Object.php
XML_MXML_Compiler_Style
XML/MXML/Compiler/Style.php
XML_MXML_Compiler_Binding
XML/MXML/Compiler/Binding.php
XML_MXML_Compiler_Array
XML/MXML/Compiler/Array.php
XML_MXML_Compiler_Script
XML/MXML/Compiler/Script.php
XML_MXML_Formatters_Formatter
XML/MXML/Formatters/Formatter.php
XML_MXML_ServiceTags_Argument
XML/MXML/ServiceTags/Argument.php
XML_MXML_ServiceTags_Request
XML/MXML/ServiceTags/Request.php
XML_MXML_ServiceTags_HTTPService
XML/MXML/ServiceTags/HTTPService.php
XML_MXML_ServiceTags_WebService
XML/MXML/ServiceTags/WebService.php
XML_MXML_ServiceTags_Method
XML/MXML/ServiceTags/Method.php
XML_MXML_ServiceTags_Operation
XML/MXML/ServiceTags/Operation.php
XML_MXML_Controls_RadioButtonGroup
XML/MXML/Controls/RadioButtonGroup.php
XML_MXML_Effects_Effect
XML/MXML/Effects/Effect.php

Inherited Variables

Inherited Methods


Class Details

[line 43]
XML/MXML/Element.php

Base class for all elements.



[ Top ]


Class Variables

$allowedChilds = array()

[line 119]

Set of allowed child elements for this element.
  • Access: protected

Type:   array


[ Top ]

$attributeDefinitions = array()

[line 110]

Set of attributes for this element.
  • Access: protected

Type:   array


[ Top ]

$attributes = array()

[line 60]

Attributes of the element.
  • Access: public

Type:   array


[ Top ]

$cdata =

[line 76]

CData of the element
  • Access: public

Type:   string


[ Top ]

$childNodes = array()

[line 68]

Child nodes of the element.
  • Access: public

Type:   array


[ Top ]

$document =

[line 128]

Stores a reference to the document that created the element.
  • Access: protected



[ Top ]

$elementName =

[line 52]

Element name.
  • Access: public

Type:   string


[ Top ]

$isRoot =  false

[line 84]

Indicates whether the element is the root element.
  • Access: public

Type:   boolean


[ Top ]

$knownElement =  true

[line 100]

Wheter element is MXML element or not.
  • Access: public

Type:   boolean


[ Top ]

$replaceEntities =  true

[line 92]

Flag to indicate whether xml entities should be replaced.
  • Access: public

Type:   boolean


[ Top ]



Method Detail

addAttributeDefinitions   [line 1044]

void addAttributeDefinitions( [array $attr_def = array()])

Add attribute definitions.
  • Access: protected

Parameters:

array   $attr_def   — 

[ Top ]

addCData   [line 458]

void addCData( string $cdata)

Add cdata.
  • Access: public

Parameters:

string   $cdata   — 

[ Top ]

appendChild   [line 575]

void appendChild( object $obj)

Add a child object.
  • Access: public

Parameters:

object   $obj   — 

[ Top ]

appendStructure   [line 511]

void appendStructure( array $arr, [bool $replaceEntities = true])

Append structure to element.
  • Throws: Exception
  • Access: public

Parameters:

array   $arr   — 
bool   $replaceEntities   — 

[ Top ]

cloneElement   [line 671]

object XML_MXML_Element cloneElement( [boolean $recursive = false], [string $id = ''])

Clone the element.

This method will return a copy of the element without the id and the childNodes.

  • Throws: Exception
  • Access: public

Parameters:

boolean   $recursive   —  whether children should be cloned, too.
string   $id   — 

[ Top ]

current   [line 230]

void current( )

Return the current element.
  • Access: public

[ Top ]

dump   [line 946]

string dump( [integer $indent = ''], [boolean $last = false], [boolean $availableAttributes = false], [boolean $allowedChildren = false])

Get a debug info about the element as string.

Use this instead of a print_r on the tree.

  • Access: public

Parameters:

integer   $indent   —  nesting depth, no need to pass this
boolean   $last   — 
boolean   $availableAttributes   — 
boolean   $allowedChildren   — 

[ Top ]

__construct (Constructor)   [line 202]

XML_MXML_Element __construct( [array $attributes = array()], [string $cdata = null])

Constructor
  • Access: public

Overridden in child classes as:

XML_MXML_Styles_CSSStyleDeclaration::__construct()
Constructor
XML_MXML_Controls_GridClasses_DataGridColumn::__construct()
Constructor
XML_MXML_Validators_Validator::__construct()
Constructor
XML_MXML_Validators_EmailValidator::__construct()
Constructor
XML_MXML_Validators_StringValidator::__construct()
Constructor
XML_MXML_Validators_PhoneNumberValidator::__construct()
Constructor
XML_MXML_Validators_ZipCodeValidator::__construct()
Constructor
XML_MXML_Validators_DateValidator::__construct()
Constructor
XML_MXML_Validators_SocialSecurityValidator::__construct()
Constructor
XML_MXML_Validators_CreditCardValidator::__construct()
Constructor
XML_MXML_Validators_NumberValidator::__construct()
Constructor
XML_MXML_Core_UIObject::__construct()
Constructor
XML_MXML_Core_UIComponent::__construct()
Constructor
XML_MXML_Containers_FormHeading::__construct()
Constructor
XML_MXML_Core_View::__construct()
Constructor
XML_MXML_Containers_Container::__construct()
Constructor
XML_MXML_Containers_Accordion::__construct()
Constructor
XML_MXML_Containers_FormItem::__construct()
Constructor
XML_MXML_Containers_Box::__construct()
Constructor
XML_MXML_Containers_NavBar::__construct()
Constructor
XML_MXML_Containers_LinkBar::__construct()
Constructor
XML_MXML_Containers_TabBar::__construct()
Constructor
XML_MXML_Containers_DividedBox::__construct()
Constructor
XML_MXML_Containers_HDividedBox::__construct()
Constructor
XML_MXML_Containers_VDividedBox::__construct()
Constructor
XML_MXML_Containers_HBox::__construct()
Constructor
XML_MXML_Containers_GridItem::__construct()
Constructor
XML_MXML_Containers_ControlBar::__construct()
Constructor
XML_MXML_Containers_GridRow::__construct()
Constructor
XML_MXML_Containers_VBox::__construct()
Constructor
XML_MXML_Containers_Panel::__construct()
Constructor
XML_MXML_Containers_TitleWindow::__construct()
Constructor
XML_MXML_Containers_Grid::__construct()
Constructor
XML_MXML_Core_Application::__construct()
Constructor
XML_MXML_Containers_Form::__construct()
Constructor
XML_MXML_Containers_Canvas::__construct()
Constructor
XML_MXML_Containers_Tile::__construct()
Constructor
XML_MXML_Containers_ViewStack::__construct()
Constructor
XML_MXML_Containers_TabNavigator::__construct()
Constructor
XML_MXML_Core_ScrollView::__construct()
Constructor
XML_MXML_Controls_ListClasses_ScrollSelectList::__construct()
Constructor
XML_MXML_Controls_List::__construct()
Constructor
XML_MXML_Controls_Tree::__construct()
Constructor
XML_MXML_Controls_DataGrid::__construct()
Constructor
XML_MXML_Controls_TextArea::__construct()
Constructor
XML_MXML_Controls_Loader::__construct()
Constructor
XML_MXML_Controls_Image::__construct()
Constructor
XML_MXML_Controls_MediaPlayback::__construct()
Constructor
XML_MXML_Controls_ScrollClasses_ScrollBar::__construct()
Constructor
XML_MXML_Controls_VScrollBar::__construct()
Constructor
XML_MXML_Controls_HScrollBar::__construct()
Constructor
XML_MXML_Controls_NumericStepper::__construct()
Constructor
XML_MXML_Controls_TextInput::__construct()
Constructor
XML_MXML_Controls_SliderClasses_Slider::__construct()
Constructor
XML_MXML_Controls_VSlider::__construct()
Constructor
XML_MXML_Controls_HSlider::__construct()
Constructor
XML_MXML_Controls_MediaDisplay::__construct()
Constructor
XML_MXML_Controls_DateChooser::__construct()
Constructor
XML_MXML_Controls_ComboBase::__construct()
Constructor
XML_MXML_Controls_ComboBox::__construct()
Constructor
XML_MXML_Controls_DateField::__construct()
Constructor
XML_MXML_Controls_SimpleButton::__construct()
Constructor
XML_MXML_Controls_Button::__construct()
Constructor
XML_MXML_Controls_CheckBox::__construct()
Constructor
XML_MXML_Controls_Link::__construct()
Constructor
XML_MXML_Controls_RadioButton::__construct()
Constructor
XML_MXML_Controls_MenuBar::__construct()
Constructor
XML_MXML_Controls_HRule::__construct()
Constructor
XML_MXML_Controls_VRule::__construct()
Constructor
XML_MXML_Controls_MediaController::__construct()
Constructor
XML_MXML_Controls_Spacer::__construct()
Constructor
XML_MXML_Controls_ProgressBar::__construct()
Constructor
XML_MXML_Controls_Label::__construct()
Constructor
XML_MXML_Controls_Text::__construct()
Constructor
XML_MXML_Core_Repeater::__construct()
Constructor
XML_MXML_Compiler_DataProvider::__construct()
Constructor
XML_MXML_Compiler_Columns::__construct()
Constructor
XML_MXML_Compiler_XML::__construct()
Constructor
XML_MXML_Compiler_MetaData::__construct()
Constructor
XML_MXML_Compiler_Model::__construct()
Constructor
XML_MXML_Compiler_Object::__construct()
Constructor
XML_MXML_Compiler_Style::__construct()
Constructor
XML_MXML_Compiler_Binding::__construct()
Constructor
XML_MXML_Compiler_Array::__construct()
Constructor
XML_MXML_Compiler_Script::__construct()
Constructor
XML_MXML_Formatters_Formatter::__construct()
Constructor
XML_MXML_Formatters_DateFormatter::__construct()
Constructor
XML_MXML_Formatters_PhoneFormatter::__construct()
Constructor
XML_MXML_Formatters_ZipCodeFormatter::__construct()
Constructor
XML_MXML_Formatters_CurrencyFormatter::__construct()
Constructor
XML_MXML_Formatters_NumberFormatter::__construct()
Constructor
XML_MXML_ServiceTags_Argument::__construct()
Constructor
XML_MXML_ServiceTags_Request::__construct()
Constructor
XML_MXML_ServiceTags_HTTPService::__construct()
Constructor
XML_MXML_ServiceTags_WebService::__construct()
Constructor
XML_MXML_ServiceTags_RemoteObject::__construct()
Constructor
XML_MXML_ServiceTags_Method::__construct()
Constructor
XML_MXML_ServiceTags_Operation::__construct()
Constructor
XML_MXML_Controls_RadioButtonGroup::__construct()
Constructor
XML_MXML_Effects_Effect::__construct()
Constructor
XML_MXML_Effects_Pause::__construct()
Constructor
XML_MXML_Effects_CompositeEffect::__construct()
Constructor
XML_MXML_Effects_Parallel::__construct()
Constructor
XML_MXML_Effects_Sequence::__construct()
Constructor
XML_MXML_Effects_TweenEffect::__construct()
Constructor
XML_MXML_Effects_MaskEffect::__construct()
Constructor
XML_MXML_Effects_WipeRight::__construct()
Constructor
XML_MXML_Effects_WipeLeft::__construct()
Constructor
XML_MXML_Effects_WipeDown::__construct()
Constructor
XML_MXML_Effects_WipeUp::__construct()
Constructor
XML_MXML_Effects_Zoom::__construct()
Constructor
XML_MXML_Effects_Resize::__construct()
Constructor
XML_MXML_Effects_Move::__construct()
Constructor
XML_MXML_Effects_Fade::__construct()
Constructor

Parameters:

array   $attributes   — 
string   $cdata   — 

[ Top ]

firstChild   [line 900]

object XML_MXML_Element firstChild( )

Get the first child of the element.

If the element has no childNodes, null will be returned.

  • Access: public

[ Top ]

getAllowedChilds   [line 484]

array getAllowedChilds( )

Get allowed child elements.
  • Access: public

[ Top ]

getAttribute   [line 558]

mixed getAttribute( string $name)

Get an attribute.
  • Access: public

Parameters:

string   $name   — 

[ Top ]

getAvailableAttributes   [line 588]

array getAvailableAttributes( )

Get available attributes.
  • Access: public

[ Top ]

getChildren   [line 306]

object getChildren( )

Returns an object that recursively iterates the current element.

This object must implement RecursiveIterator.

  • Access: public

[ Top ]

getDocument   [line 389]

object XML_MXML_Document getDocument( )

Set the reference to the document.
  • Access: public

[ Top ]

getElementById   [line 717]

object XML_MXML_Element getElementById( string $id)

Get an element by its id.

You should not need to call this method directly.

  • Return: or false if the element does not exist
  • Access: public

Parameters:

string   $id   — 

[ Top ]

getElementName   [line 432]

string getElementName( )

Get the element's tag name.
  • Return: tag name of the element
  • Access: public

[ Top ]

getElementsByTagname   [line 751]

array getElementsByTagname( string $tagname)

Get a nodelist of elements by their tagname.
  • Return: array containing XML_MXML_Element objects
  • Access: public

Parameters:

string   $tagname   — 

[ Top ]

getId   [line 415]

string getId( )

Get the element's id.
  • Return: id of the element
  • Access: public

[ Top ]

hasChildren   [line 292]

bool hasChildren( )

Return whether current element can be iterated itself.
  • Access: public

[ Top ]

isLast   [line 279]

bool isLast( )

Check if current element is the last.
  • Access: public

[ Top ]

key   [line 242]

void key( )

Return the key of the current element.
  • Access: public

[ Top ]

lastChild   [line 919]

object XML_MXML_Element lastChild( )

Get last first child of the element.

If the element has no childNodes, null will be returned.

  • Access: public

[ Top ]

next   [line 254]

void next( )

Move forward to next element.
  • Access: public

[ Top ]

offsetExists   [line 322]

boolean offsetExists( mixed $offset)

Check if attribute offset exists.
  • Access: public

Parameters:

mixed   $offset   — 

[ Top ]

offsetGet   [line 336]

mixed offsetGet( mixed $offset)

Pick value from attributes.
  • Access: public

Parameters:

mixed   $offset   — 

[ Top ]

offsetSet   [line 350]

void offsetSet( mixed $offset, mixed $data)

Set certain attributes value.
  • Access: public

Parameters:

mixed   $offset   — 
mixed   $data   — 

[ Top ]

offsetUnset   [line 362]

void offsetUnset( mixed $offset)

Unset certain attributes value.
  • Access: public

Parameters:

mixed   $offset   — 

[ Top ]

rewind   [line 218]

void rewind( )

Rewind the Iterator to the first element.
  • Access: public

[ Top ]

serialize   [line 616]

string serialize( )

Serialize the element.
  • Return: string representation of the element and all of its childNodes
  • Access: public

Overridden in child classes as:

XML_MXML_Compiler_Style::serialize()
Serialize the element.

[ Top ]

setAllowedChilds   [line 471]

void setAllowedChilds( [miced $childs = array()])

Set allowed child elements.
  • Access: public

Parameters:

miced   $childs   —  Either array of elements or null (no child allowed)

[ Top ]

setAttribute   [line 544]

void setAttribute( string $name, mixed $value)

Set an attribute.
  • Access: public

Overridden in child classes as:

XML_MXML_Containers_ControlBar::setAttribute()
Set an attribute.

Parameters:

string   $name   — 
mixed   $value   — 

[ Top ]

setAttributes   [line 497]

void setAttributes( array $attribs)

Sets several attributes at once.
  • Access: public

Parameters:

array   $attribs   — 

[ Top ]

setCData   [line 445]

void setCData( string $cdata)

Sets cdata of the element.
  • Access: public

Parameters:

string   $cdata   — 

[ Top ]

setDocument   [line 376]

void setDocument( object $doc)

Set the reference to the document.
  • Access: public

Parameters:

object   $doc   —  XML_MXML_Document

[ Top ]

setNamespace   [line 402]

void setNamespace( string $ns)

Set Namespace.
  • Access: public

Parameters:

string   $ns   — 

[ Top ]

toXML   [line 603]

string toXML( )

Create a string representation of the element.

This is just an alias for serialize().

  • Return: string representation of the element and all of its childNodes
  • Access: public

[ Top ]

valid   [line 266]

void valid( )

Check if there is a current element after calls to rewind() or next().
  • Access: public

[ Top ]

validate   [line 791]

boolean validate( [boolean $caseInsensitive = true], [string $version = null])

Validate the element's attributes.

Uses the definitions of common attributes as well as the attribute definitions of the element.

  • Return: true on succes
  • Throws: Exception
  • Access: public

Overridden in child classes as:

XML_MXML_Compiler_Columns::validate()
Overrides validate method from XML_MXML_Element.
XML_MXML_Compiler_Object::validate()
Overrides validate method from XML_MXML_Element.
XML_MXML_ServiceTags_Argument::validate()
Overrides validate method from XML_MXML_Element.

Parameters:

boolean   $caseInsensitive   — 
string   $version   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:57:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.