Copied!
  • noinspection PhpHierarchyChecksInspection
  • implements \IteratorAggregate<int, \DOMNode>
CloneableInstantiableIterable
Methods
public __call( $name, $arguments)
 
  • param string $name
  • param array $arguments
  • throws \BadMethodCallException
  • return \SimpleHtmlDomInterface|string|null
public voku\helper\AbstractSimpleHtmlDom::__get( $name)
 
  • param string $name
  • return \SimpleHtmlAttributes|string|string[]|null
public voku\helper\AbstractSimpleHtmlDom::__invoke( $selector, $idx = NULL)
 
  • param string $selector
  • param int $idx
  • return \SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public voku\helper\AbstractSimpleHtmlDom::__isset( $name)
 
  • param string $name
  • return bool
public voku\helper\AbstractSimpleHtmlDom::__set( $name, $value)
 
  • param string $name
  • param mixed $value
  • return \SimpleHtmlDomInterface|null
public voku\helper\AbstractSimpleHtmlDom::__toString() : string
 
  • return string
public voku\helper\AbstractSimpleHtmlDom::__unset( $name)
 
  • param string $name
  • return void
public childNodes(int $idx = -1)
 

Returns children of node.

  • param int $idx
  • return null
public delete()
 

Delete

  • return void
public find(string $selector, $idx = NULL)
 

Find list of nodes with a CSS selector.

  • param string $selector
  • param int|null $idx
  • return \SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public findMulti(string $selector) : voku\helper\SimpleHtmlDomNodeInterface
 

Find nodes with a CSS selector.

  • param string $selector
  • return \SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public findMultiOrFalse(string $selector)
 

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

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

Find one node with a CSS selector.

  • param string $selector
  • return \SimpleHtmlDomInterface
public findOneOrFalse(string $selector)
 

Find one node with a CSS 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\SimpleHtmlDomNodeInterface
 

Return elements by ".class".

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

Return element by #id.

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

Return element by tag name.

  • param string $name
  • return \SimpleHtmlDomInterface
public getElementsById(string $id, $idx = NULL)
 

Returns elements by "#id".

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

Returns elements by tag name.

  • param string $name
  • param int|null $idx
  • return \SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public getHtmlDomParser() : voku\helper\HtmlDomParser
 

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

  • return \HtmlDomParser
public getIterator() : voku\helper\SimpleHtmlDomNodeInterface
 

Retrieve an external iterator.

  • see http://php.net/manual/en/iteratoraggregate.getiterator.php
  • return \SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public getNode() : DOMNode
 
  • return \DOMNode
public getTag() : string
public hasAttribute(string $name) : bool
 

Determine if an attribute exists on the element.

  • param string $name
  • return bool
public hasAttributes() : bool
 
  • return bool
public html(bool $multiDecodeNewHtmlEntity = false) : string
 

Get dom node's outer html.

  • param bool $multiDecodeNewHtmlEntity
  • return string
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\SimpleHtmlDomInterface
 

Returns the parent of node.

  • return \SimpleHtmlDomInterface|null
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\SimpleHtmlDomInterface
 

Remove attribute.

  • param string $name
  • return \SimpleHtmlDomInterface
public removeAttributes() : voku\helper\SimpleHtmlDomInterface
 

Remove all attributes

  • return \SimpleHtmlDomBlank
public setAttribute(string $name, $value = NULL, bool $strictEmptyValueCheck = false) : voku\helper\SimpleHtmlDomInterface
 

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 \SimpleHtmlDomInterface
public text() : string
 

Get dom node's plain text.

  • return string
public val( $value = NULL)
 
  • param string|string[]|null $value
  • return string|string[]|null
Properties
protected static voku\helper\AbstractSimpleHtmlDom::$functionAliases = ['children' => 'childNodes', 'first_child' => 'firstChild', 'last_child' => 'lastChild', 'next_sibling' => 'nextSibling', 'prev_sibling' => 'previousSibling', 'parent' => 'parentNode', 'outertext' => 'html', 'outerhtml' => 'html', 'innertext' => 'innerHtml', 'innerhtml' => 'innerHtml', 'innerhtmlkeep' => 'innerHtmlKeep']
 
  • var array
protected voku\helper\AbstractSimpleHtmlDom::$node = NULL
 
  • var \DOMElement|\DOMNode|null
protected static voku\helper\AbstractSimpleHtmlDom::$stringDomNodes = ['id', 'prefix', 'content']
 
  • var string[]
Methods
protected replaceChildWithString(string $string, bool $putBrokenReplacedBack = true) : voku\helper\SimpleHtmlDomInterface
 
  • param string $string
  • param bool $putBrokenReplacedBack
  • return \SimpleHtmlDomInterface
protected replaceNodeWithString(string $string) : voku\helper\SimpleHtmlDomInterface
 
  • param string $string
  • return \SimpleHtmlDomInterface
protected replaceTextWithString( $string) : voku\helper\SimpleHtmlDomInterface
 
  • param string $string
  • return \SimpleHtmlDomInterface
Properties
protected static voku\helper\AbstractSimpleHtmlDom::$functionAliases = ['children' => 'childNodes', 'first_child' => 'firstChild', 'last_child' => 'lastChild', 'next_sibling' => 'nextSibling', 'prev_sibling' => 'previousSibling', 'parent' => 'parentNode', 'outertext' => 'html', 'outerhtml' => 'html', 'innertext' => 'innerHtml', 'innerhtml' => 'innerHtml', 'innerhtmlkeep' => 'innerHtmlKeep']
 
  • var array
protected static voku\helper\AbstractSimpleHtmlDom::$stringDomNodes = ['id', 'prefix', 'content']
 
  • var string[]
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration