API / Minn\Html / TagQuery

TagQuery final readonly class

Minn\Html\TagQuery · public/minn/src/Minn/Html/TagQuery.php · 37 lines

A tag processor's next_tag() query: a tag name (any case), a class, the nth match to stop at, and whether closers count.

Uses 1
Used by 1

Constants and properties

propreadonly ?string $tagName

Promoted from the constructor.

propreadonly ?string $className

Promoted from the constructor.

propreadonly int $offset

Promoted from the constructor.

propreadonly string $closers

Promoted from the constructor.

Public

new__construct(?string $tagName, ?string $className, int $offset, string $closers)#
staticfrom(array $query): self#

The query read from the array a caller passes.

$queryarray{tag_name?: ?string, class_name?: ?string, match_offset?: int, tag_closers?: string}
methodmatches(string $name, int $closer, callable $hasClass): bool#

Whether a tag (by name, closer or not, and a class test) matches, before the offset is counted.