Copied!
  • noinspection PhpHierarchyChecksInspection
  • implements \IteratorAggregate<int, \DOMNode>
Cloneable Instantiable Iterable
Methods
public __call ( $name , $arguments )
 
public voku\helper\AbstractSimpleXmlDom :: __get ( $name )
 
  • param string $name
  • return array | string | null
public voku\helper\AbstractSimpleXmlDom :: __invoke ( $selector , $idx = NULL )
 
public voku\helper\AbstractSimpleXmlDom :: __isset ( $name )
 
  • param string $name
  • return bool
public voku\helper\AbstractSimpleXmlDom :: __set ( $name , $value )
 
public voku\helper\AbstractSimpleXmlDom :: __toString () : string
 
  • return string
public voku\helper\AbstractSimpleXmlDom :: __unset ( $name )
 
  • param string $name
  • return void
public childNodes ( int $idx = -1 )
 

Returns children of node.

  • param int $idx
  • return null
public find ( string $selector , $idx = NULL )
 

Find list of nodes with a CSS or xPath selector.

public findMulti ( string $selector ) : voku\helper\SimpleXmlDomNodeInterface
 

Find nodes with a CSS or xPath selector.

  • param string $selector
  • return SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
public findMultiOrFalse ( string $selector )
 

Find nodes with a CSS or xPath selector or false, if no element is found.

  • param string $selector
  • return false
public findOne ( string $selector ) : voku\helper\SimpleXmlDomInterface
 

Find one node with a CSS or xPath selector.

public findOneOrFalse ( string $selector )
 

Find one node with a CSS or xPath selector or false, if no element is found.

  • param string $selector
  • return false
public firstChild ()
 

Returns the first child of node.

  • return null
public getAllAttributes ()
 

Returns an array of attributes.

  • return string []| null
public getAttribute ( string $name ) : string
 

Return attribute value.

  • param string $name
  • return string
  • return string
public getElementByClass ( string $class ) : voku\helper\SimpleXmlDomNodeInterface
 

Return elements by ".class".

  • param string $class
  • return SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
public getElementById ( string $id ) : voku\helper\SimpleXmlDomInterface
 

Return element by #id.

public getElementByTagName ( string $name ) : voku\helper\SimpleXmlDomInterface
 

Return element by tag name.

public getElementsById ( string $id , $idx = NULL )
 

Returns elements by "#id".

  • param string $id
  • param int | null $idx
  • return SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
public getElementsByTagName ( string $name , $idx = NULL )
 

Returns elements by tag name.

  • param string $name
  • param int | null $idx
  • return SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
public getIterator () : voku\helper\SimpleXmlDomNodeInterface
 

Retrieve an external iterator.

  • see http://php.net/manual/en/iteratoraggregate.getiterator.php
  • return SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>


    An instance of an object implementing Iterator or
    Traversable

public getNode () : DOMNode
 
  • return DOMNode
public getXmlDomParser () : voku\helper\XmlDomParser
 

Create a new "XmlDomParser"-object from the current context.

public hasAttribute ( string $name ) : bool
 

Determine if an attribute exists on the element.

  • param string $name
  • return bool
  • return bool
public hasAttributes () : bool
 
  • return bool
public innerHtml ( bool $multiDecodeNewHtmlEntity = false , bool $putBrokenReplacedBack = true ) : string
 

Get dom node's inner html.

  • param bool $multiDecodeNewHtmlEntity
  • param bool $putBrokenReplacedBack
  • return string
public innerXml ( bool $multiDecodeNewHtmlEntity = false ) : string
 

Get dom node's inner xml.

  • param bool $multiDecodeNewHtmlEntity
  • return string
public isRemoved () : bool
 

Nodes can get partially destroyed in which they're still an
actual DOM node (such as \DOMElement) but almost their entire
body is gone, including the nodeType attribute.

  • return bool true if node has been destroyed
public lastChild ()
 

Returns the last child of node.

  • return null
public nextNonWhitespaceSibling ()
 

Returns the next sibling of node.

  • return null
public nextSibling ()
 

Returns the next sibling of node.

  • return null
public parentNode () : voku\helper\SimpleXmlDomInterface
 

Returns the parent of node.

public previousNonWhitespaceSibling ()
 

Returns the previous sibling of node.

  • return null
public previousSibling ()
 

Returns the previous sibling of node.

  • return null
public removeAttribute ( string $name ) : voku\helper\SimpleXmlDomInterface
 

Remove attribute.

public setAttribute ( string $name , $value = NULL , bool $strictEmptyValueCheck = false ) : voku\helper\SimpleXmlDomInterface
 

Set attribute value.

  • param string $name
  • param string | null $value
  • param bool $strictEmptyValueCheck
  • return voku\helper\SimpleXmlDomInterface
  • param string | null $value

    Set to NULL or empty string, to remove the attribute.

  • param bool $strictEmptyValueCheck


    $value must be NULL, to remove the attribute,
    so that you can set an empty string as attribute-value e.g. autofocus=""

  • return voku\helper\SimpleXmlDomInterface
public text () : string
 

Get dom node's plain text.

  • return string
public val ( $value = NULL )
 
  • param string | string []| null $value


    null === get the current input value
    text === set a new input value

  • return string | string []| null
public xml ( bool $multiDecodeNewHtmlEntity = false ) : string
 

Get dom node's outer html.

  • param bool $multiDecodeNewHtmlEntity
  • return string
Properties
protected static voku\helper\AbstractSimpleXmlDom :: $functionAliases = [ 'children' => 'childNodes' , 'first_child' => 'firstChild' , 'last_child' => 'lastChild' , 'next_sibling' => 'nextSibling' , 'prev_sibling' => 'previousSibling' , 'parent' => 'parentNode' ]
 
  • var array
protected voku\helper\AbstractSimpleXmlDom :: $node
 
  • var DOMElement | DOMNode | null
Methods
protected replaceChildWithString ( string $string , bool $putBrokenReplacedBack = true ) : voku\helper\SimpleXmlDomInterface
 
protected replaceNodeWithString ( string $string ) : voku\helper\SimpleXmlDomInterface
 
protected replaceTextWithString ( $string ) : voku\helper\SimpleXmlDomInterface
Properties
protected static voku\helper\AbstractSimpleXmlDom :: $functionAliases = [ 'children' => 'childNodes' , 'first_child' => 'firstChild' , 'last_child' => 'lastChild' , 'next_sibling' => 'nextSibling' , 'prev_sibling' => 'previousSibling' , 'parent' => 'parentNode' ]
 
  • var array
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration