Table of contents
Namespace: Com\Tecnick\Pdf\HTML
trait Selector
Source: src/HTML/Selector.php:42
CSS selector matching against the HTML DOM.
Methods
getHTMLDOMCSSData()
Returns the styles array that apply for the selected HTML tag.
public getHTMLDOMCSSData(
array<int,THTMLDOMNode> &$dom,
array<string,string> $css,
int $key
): void
Parameters:
$dom(array<int,THTMLDOMNode>)$css(array<string,string>)$key(int): Key of the current HTML tag.
Source: src/HTML/Selector.php:51
isValidCSSSelectorForTag()
Returns true if the CSS selector is valid for the selected HTML tag.
public isValidCSSSelectorForTag(array<int,THTMLDOMNode> &$dom, int $key, string $selector): bool
Parameters:
$dom(array<int,THTMLDOMNode>)$key(int): key of the current HTML tag$selector(string): CSS selector string
Returns: bool: True if the selector is valid, false otherwise
Source: src/HTML/Selector.php:386