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 __construct(DOMNode $node)
 
  • param \DOMElement|\DOMNode $node
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 \SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface|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 \SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public findMulti(string $selector) : voku\helper\SimpleHtmlDomNodeInterface
 

Find nodes with a CSS selector.

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

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

  • param string $selector
  • return false|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
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|\SimpleHtmlDomInterface
public firstChild()
 

Returns the first child of node.

  • return \SimpleHtmlDomInterface|null
public getAllAttributes()
 

Returns an array of attributes.

  • return string[]|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 \SimpleHtmlDomInterface[]|\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 \SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
public getElementsByTagName(string $name, $idx = NULL)
 

Returns elements by tag name.

  • param string $name
  • param int|null $idx
  • return \SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\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 \SimpleHtmlDomNode
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 html.

  • 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 \SimpleHtmlDomInterface|null
public nextNonWhitespaceSibling()
 

Returns the next sibling of node.

  • return \SimpleHtmlDomInterface|null
public nextSibling()
 

Returns the next sibling of node.

  • return \SimpleHtmlDomInterface|null
public parentNode() : voku\helper\SimpleHtmlDomInterface
 

Returns the parent of node.

  • return \SimpleHtmlDomInterface
public previousNonWhitespaceSibling()
 

Returns the previous sibling of node.

  • return \SimpleHtmlDomInterface|null
public previousSibling()
 

Returns the previous sibling of node.

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

Remove attribute.

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

Remove all attributes

  • return \SimpleHtmlDomInterface
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
Methods
protected changeElementName(DOMNode $node, string $name)
 

Change the name of a tag in a "DOMNode".

  • param \DOMNode $node
  • param string $name
  • return \DOMElement|false
protected cleanHtmlWrapper(voku\helper\HtmlDomParser $newDocument, $removeExtraHeadTag = false) : voku\helper\HtmlDomParser
 
  • param \HtmlDomParser $newDocument
  • param bool $removeExtraHeadTag
  • return \HtmlDomParser
protected replaceChildWithString(string $string, bool $putBrokenReplacedBack = true) : voku\helper\SimpleHtmlDomInterface
 

Replace child node.

  • param string $string
  • param bool $putBrokenReplacedBack
  • return \SimpleHtmlDomInterface
protected replaceNodeWithString(string $string) : voku\helper\SimpleHtmlDomInterface
 

Replace this node.

  • param string $string
  • return \SimpleHtmlDomInterface
protected replaceTextWithString( $string) : voku\helper\SimpleHtmlDomInterface
 

Replace this node with text

  • param string $string
  • return \SimpleHtmlDomInterface
Methods
private normalizeStringForComparison( $input) : string
 

Normalize the given input for comparison.

  • param \HtmlDomParser|string $input
  • return string
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
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration