Methods |
public voku\helper\AbstractDomParser::__call( $name, $arguments) - param string $name
- param array $arguments
- return bool|mixed
|
public static __callStatic( $name, $arguments) - param string $name
- param array $arguments
- throws \BadMethodCallException
- throws \RuntimeException
- return static
|
public voku\helper\AbstractDomParser::__clone() |
public __construct( $element = NULL) - param \DOMNode|\SimpleXmlDomInterface|string $element HTML code or SimpleXmlDomInterface, \DOMNode
|
public __get( $name) - param string $name
- return string|null
|
public __invoke( $selector, $idx = NULL) - param string $selector
- param int $idx
- return \SimpleXmlDomInterface|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
public __toString() : string |
public autoRegisterXPathNamespaces(bool $autoRegisterXPathNamespaces = true) : self - param bool $autoRegisterXPathNamespaces
- return $this
|
public autoRemoveXPathNamespaces(bool $autoRemoveXPathNamespaces = true) : self - param bool $autoRemoveXPathNamespaces
- return $this
|
public voku\helper\AbstractDomParser::clear() : bool does nothing (only for api-compatibility-reasons) |
public find(string $selector, $idx = NULL) Find list of nodes with a CSS or xPath selector. - param string $selector
- param int|null $idx
- return \SimpleXmlDomInterface|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
public findMulti(string $selector) : voku\helper\SimpleXmlDomNodeInterface Find nodes with a CSS or xPath selector. - param string $selector
- return \SimpleXmlDomInterface[]|\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|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
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|\SimpleXmlDomInterface
|
public fixHtmlOutput(string $content, bool $multiDecodeNewHtmlEntity = false, bool $putBrokenReplacedBack = true) : string - param string $content
- param bool $multiDecodeNewHtmlEntity
- param bool $putBrokenReplacedBack
- return string
|
public voku\helper\AbstractDomParser::getDocument() : DOMDocument |
public getElementByClass(string $class) : voku\helper\SimpleXmlDomNodeInterface Return elements by ".class". - param string $class
- return \SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
public getElementById(string $id) : voku\helper\SimpleXmlDomInterface - 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 \SimpleXmlDomInterface|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
public getElementsByTagName(string $name, $idx = NULL) Returns elements by tag name. - param string $name
- param int|null $idx
- return \SimpleXmlDomInterface|\SimpleXmlDomInterface[]|\SimpleXmlDomNodeInterface<\SimpleXmlDomInterface>
|
public html(bool $multiDecodeNewHtmlEntity = false, bool $putBrokenReplacedBack = true) : string Get dom node's outer html. - param bool $multiDecodeNewHtmlEntity
- param bool $putBrokenReplacedBack
- return string
|
public voku\helper\AbstractDomParser::innerHtml(bool $multiDecodeNewHtmlEntity = false, bool $putBrokenReplacedBack = true) : string Get dom node's inner html. - param bool $multiDecodeNewHtmlEntity
- param bool $putBrokenReplacedBack
- return string
|
public voku\helper\AbstractDomParser::innerXml(bool $multiDecodeNewHtmlEntity = false) : string Get dom node's inner html. - param bool $multiDecodeNewHtmlEntity
- return string
|
public loadHtml(string $html, $libXMLExtraOptions = NULL) : voku\helper\DomParserInterface - param string $html
- param int|null $libXMLExtraOptions
- return $this
|
public loadHtmlFile(string $filePath, $libXMLExtraOptions = NULL) : voku\helper\DomParserInterface - param string $filePath
- param int|null $libXMLExtraOptions
- throws \RuntimeException
- return $this
|
public loadXml(string $xml, $libXMLExtraOptions = NULL, $useDefaultLibXMLOptions = true) : self - param string $xml
- param int|null $libXMLExtraOptions
- param bool $useDefaultLibXMLOptions
- return $this
|
public loadXmlFile(string $filePath, $libXMLExtraOptions = NULL, $useDefaultLibXMLOptions = true) : self - param string $filePath
- param int|null $libXMLExtraOptions
- param bool $useDefaultLibXMLOptions
- throws \RuntimeException
- return $this
|
public static voku\helper\AbstractDomParser::putReplacedBackToPreserveHtmlEntities(string $html, bool $putBrokenReplacedBack = true) : string - param string $html
- return string
|
public replaceTextWithCallback( $callback, ?DOMNode $domNode = NULL) - param callable $callback
- param \DOMNode|null $domNode
- return void
|
public static voku\helper\AbstractDomParser::replaceToPreserveHtmlEntities(string $html) : string - param string $html
- return string
|
public reportXmlErrorsAsException(bool $reportXmlErrorsAsException = true) : self - param bool $reportXmlErrorsAsException
- return $this
|
public voku\helper\AbstractDomParser::save(string $filepath = '') : string Save the html-dom as string. - param string $filepath
- return string
|
public voku\helper\AbstractDomParser::set_callback( $functionName) - param callable $functionName
- phpstan-param callable(\voku\helper\XmlDomParser|\voku\helper\HtmlDomParser): void $functionName
- return void
|
public setCallbackBeforeCreateDom(callable $callbackBeforeCreateDom) : self - param callable $callbackBeforeCreateDom
- phpstan-param callable(string $xmlString, \voku\helper\XmlDomParser): string $callbackBeforeCreateDom
- return $this
|
public setCallbackXPathBeforeQuery(callable $callbackXPathBeforeQuery) : self - param callable $callbackXPathBeforeQuery
- phpstan-param callable(string $cssSelectorString, string $xPathString, \DOMXPath, \voku\helper\XmlDomParser): string $callbackXPathBeforeQuery
- return $this
|
public voku\helper\AbstractDomParser::text(bool $multiDecodeNewHtmlEntity = false) : string Get dom node's plain text. - param bool $multiDecodeNewHtmlEntity
- return string
|
public voku\helper\AbstractDomParser::xml(bool $multiDecodeNewHtmlEntity = false, bool $htmlToXml = true, bool $removeXmlHeader = true, int $options = 4LIBXML_NOEMPTYTAG) : string Get the HTML as XML or plain XML if needed. - param bool $multiDecodeNewHtmlEntity
- param bool $htmlToXml
- param bool $removeXmlHeader
- param int $options
- return string
|