count | find | findMulti | findMultiOrFalse |
findOne | findOneOrFalse | innerHtml | innertext |
outertext | text |
↑ Find list of nodes with a CSS selector.
Parameters:
string $selector
int|null $idx
Return:
mixed
↑ Find nodes with a CSS selector.
Parameters:
string $selector
Return:
mixed
↑ Find nodes with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
mixed
↑ Find one node with a CSS selector.
Parameters:
string $selector
Return:
static
↑ Find one node with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
mixed
Parameters:
string $content
bool $multiDecodeNewHtmlEntity
Return:
string
Parameters: nothing
Return:
\DOMDocument
↑ Return elements by ".class".
Parameters:
string $class
Return:
mixed
↑ Return element by #id.
Parameters:
string $id
Return:
mixed
↑ Return element by tag name.
Parameters:
string $name
Return:
mixed
↑ Returns elements by "#id".
Parameters:
string $id
int|null $idx
Return:
mixed
↑ Returns elements by tag name.
Parameters:
string $name
int|null $idx
Return:
mixed
↑ Get dom node's outer html.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Get dom node's inner html.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Get dom node's inner xml.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Load HTML from string.
Parameters:
string $html
int|null $libXMLExtraOptions
Return:
\DomParserInterface
↑ Load HTML from file.
Parameters:
string $filePath
int|null $libXMLExtraOptions
Return:
\DomParserInterface
↑ Save the html-dom as string.
Parameters:
string $filepath
Return:
string
Parameters:
callable $functionName
Return:
mixed
↑ Get dom node's plain text.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Get the HTML as XML or plain XML if needed.
Parameters:
bool $multiDecodeNewHtmlEntity
bool $htmlToXml
bool $removeXmlHeader
int $options
Return:
string
↑ Get the number of items in this dom node.
Parameters: nothing
Return:
int
↑ Find list of nodes with a CSS selector.
Parameters:
string $selector
int $idx
Return:
\SimpleHtmlDomNode|\SimpleHtmlDomNode[]|null
findMulti(string $selector): SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find nodes with a CSS selector.
Parameters:
string $selector
Return:
\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
findMultiOrFalse(string $selector): false|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find nodes with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
false|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find one node with a CSS selector.
Parameters:
string $selector
Return:
\SimpleHtmlDomNode|null
↑ Find one node with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
false|\SimpleHtmlDomNode
↑ Get html of elements.
Parameters: nothing
Return:
string[]
↑ alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x)
Parameters: nothing
Return:
string[]
↑ alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x)
Parameters: nothing
Return:
string[]
↑ Get plain text.
Parameters: nothing
Return:
string[]
childNodes(int $idx): SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface|null
↑ Returns children of node.
Parameters:
int $idx
Return:
\SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface|null
↑ Delete
Parameters: nothing
Return:
mixed
find(string $selector, int|null $idx): SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find list of nodes with a CSS selector.
Parameters:
string $selector
int|null $idx
Return:
\SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
findMulti(string $selector): SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find nodes with a CSS selector.
Parameters:
string $selector
Return:
\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
findMultiOrFalse(string $selector): false|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find nodes with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
false|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Find one node with a CSS selector.
Parameters:
string $selector
Return:
\SimpleHtmlDomInterface
↑ Find one node with a CSS selector or false, if no element is found.
Parameters:
string $selector
Return:
false|\SimpleHtmlDomInterface
↑ Returns the first child of node.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Returns an array of attributes.
Parameters: nothing
Return:
string[]|null
↑ Return attribute value.
Parameters:
string $name
Return:
string
getElementByClass(string $class): SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Return elements by ".class".
Parameters:
string $class
Return:
\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Return element by "#id".
Parameters:
string $id
Return:
\SimpleHtmlDomInterface
↑ Return element by tag name.
Parameters:
string $name
Return:
\SimpleHtmlDomInterface
getElementsById(string $id, int|null $idx): SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Returns elements by "#id".
Parameters:
string $id
int|null $idx
Return:
\SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
getElementsByTagName(string $name, int|null $idx): SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Returns elements by tag name.
Parameters:
string $name
int|null $idx
Return:
\SimpleHtmlDomInterface|\SimpleHtmlDomInterface[]|\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
↑ Create a new "HtmlDomParser"-object from the current context.
Parameters: nothing
Return:
\HtmlDomParser
↑ Retrieve an external iterator.
Parameters: nothing
Return:
- `\SimpleHtmlDomNodeInterface<\SimpleHtmlDomInterface>
An instance of an object implementing Iterator or Traversable
Parameters: nothing
Return:
\DOMNode
↑ Return the tag of node
Parameters: nothing
Return:
string
↑ Determine if an attribute exists on the element.
Parameters:
string $name
Return:
bool
↑ Get dom node's outer html.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Get dom node's inner html.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑ Get dom node's inner html.
Parameters:
bool $multiDecodeNewHtmlEntity
Return:
string
↑
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.
Parameters: nothing
Return:
bool true if node has been destroyed
↑ Returns the last child of node.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Returns the next sibling of node, and it will ignore whitespace elements.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Returns the next sibling of node.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Returns the parent of node.
Parameters: nothing
Return:
\SimpleHtmlDomInterface
↑ Returns the previous sibling of node, and it will ignore whitespace elements.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Returns the previous sibling of node.
Parameters: nothing
Return:
\SimpleHtmlDomInterface|null
↑ Remove attribute.
Parameters:
string $name <p>The name of the html-attribute.</p>
Return:
\SimpleHtmlDomInterface
↑ Remove all attributes
Parameters: nothing
Return:
\SimpleHtmlDomInterface
↑ Set attribute value.
Parameters:
string $name <p>The name of the html-attribute.</p>
string|null $value <p>Set to NULL or empty string, to remove the attribute.</p>
- `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:
\SimpleHtmlDomInterface
↑ Get dom node's plain text.
Parameters: nothing
Return:
string
Parameters:
- `string|string[]|null $value
null === get the current input value text === set a new input value
Return:
string|string[]|null