Copied!
  • noinspection PhpHierarchyChecksInspection
  • implements \IteratorAggregate<int, \DOMNode>
CloneableInstantiableIterable
Methods
public __call( $name, $arguments)
 
  • param string $name
  • param array $arguments
  • throws \BadMethodCallException
  • return \SimpleXmlDomInterface|string|null
public voku\helper\AbstractSimpleXmlDom::__get( $name)
 
  • param string $name
  • return array|string|null
public voku\helper\AbstractSimpleXmlDom::__invoke( $selector, $idx = NULL)
 
  • param string $selector
  • param int|null $idx
  • return \SimpleXmlDomInterface|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
public voku\helper\AbstractSimpleXmlDom::__isset( $name)
 
  • param string $name
  • return bool
public voku\helper\AbstractSimpleXmlDom::__set( $name, $value)
 
  • param string $name
  • param mixed $value
  • return \SimpleXmlDomInterface|null
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.

  • param string $selector
  • param int|null $idx
  • return \SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
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.

  • param string $selector
  • return \SimpleXmlDomInterface
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 null
public getAttribute(string $name) : string
 

Return attribute value.

  • param string $name
  • 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.

  • param string $id
  • return \SimpleXmlDomInterface
public getElementByTagName(string $name) : voku\helper\SimpleXmlDomInterface
 

Return element by tag name.

  • param string $name
  • return \SimpleXmlDomInterface
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>
public getNode() : DOMNode
 
  • return \DOMNode
public getXmlDomParser() : voku\helper\XmlDomParser
 

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

  • return \XmlDomParser
public hasAttribute(string $name) : bool
 

Determine if an attribute exists on the element.

  • param string $name
  • 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.

  • return \SimpleXmlDomInterface
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.

  • param string $name
  • return \SimpleXmlDomInterface
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 </p> $value must be NULL, to remove the attribute, so that you can set an empty string as attribute-value e.g. autofocus=""
  • return \SimpleXmlDomInterface
public text() : string
 

Get dom node's plain text.

  • return string
public val( $value = NULL)
 
  • param string|string[]|null $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 = NULL
 
  • var \DOMElement|\DOMNode|null
Methods
protected replaceChildWithString(string $string, bool $putBrokenReplacedBack = true) : voku\helper\SimpleXmlDomInterface
 
  • param string $string
  • param bool $putBrokenReplacedBack
  • return \SimpleXmlDomInterface
protected replaceNodeWithString(string $string) : voku\helper\SimpleXmlDomInterface
 
  • param string $string
  • return \SimpleXmlDomInterface
protected replaceTextWithString( $string) : voku\helper\SimpleXmlDomInterface
 
  • param string $string
  • return \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
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration