$headlessContentBlocker
$headlessContentBlocker :
Converts e.g. `onload` attributes to `consent-original-src` attributes when item got blocked.
__construct(\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker $headlessContentBlocker)
C'tor.
\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker | $headlessContentBlocker |
beforeMatch(\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match)
Called before a match got found.
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
blockedMatch(\DevOwl\HeadlessContentBlocker\plugins\BlockedResult $result,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match)
See `AbstractPlugin`.
\DevOwl\HeadlessContentBlocker\plugins\BlockedResult | $result | |
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
notBlockedMatch(\DevOwl\HeadlessContentBlocker\BlockedResult $result,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match)
Called after a match got not blocked. Opposite of `blockedMatch`.
\DevOwl\HeadlessContentBlocker\BlockedResult | $result | |
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
checkResult(\DevOwl\HeadlessContentBlocker\BlockedResult $result,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match): \DevOwl\HeadlessContentBlocker\BlockedResult
Called after a match got found and the matcher decided, if it should be blocked or not.
\DevOwl\HeadlessContentBlocker\BlockedResult | $result | |
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
keepAlwaysAttributes(array<mixed,string> $keepAttributes,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match): array<mixed,string>
Keep attributes for a specific match.
array<mixed,string> | $keepAttributes | |
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
skipInlineScriptVariableAssignment(array<mixed,string> $names,\DevOwl\HeadlessContentBlocker\matcher\ScriptInlineMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\ScriptInlineMatch $match): array<mixed,string>
Skip inline script by variable name.
array<mixed,string> | $names | |
\DevOwl\HeadlessContentBlocker\matcher\ScriptInlineMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\ScriptInlineMatch | $match |
inlineStyleShouldBeExtracted(boolean $extract,\DevOwl\HeadlessContentBlocker\matcher\StyleInlineMatcher|\DevOwl\HeadlessContentBlocker\matcher\StyleInlineAttributeMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\StyleInlineMatch|\DevOwl\HeadlessContentBlocker\finder\match\StyleInlineAttributeMatch $match): boolean
Do not extract blocked rules of a CSS inline script to a second document.
inlineStyleModifyDocuments(\Sabberworm\CSS\CSSList\Document $document,\Sabberworm\CSS\CSSList\Document $extractedDocument,\DevOwl\HeadlessContentBlocker\matcher\StyleInlineMatcher|\DevOwl\HeadlessContentBlocker\matcher\StyleInlineAttributeMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\StyleInlineMatch|\DevOwl\HeadlessContentBlocker\finder\match\StyleInlineAttributeMatch $match): boolean
Allows to modify blocked CSS documents.
\Sabberworm\CSS\CSSList\Document | $document | |
\Sabberworm\CSS\CSSList\Document | $extractedDocument | |
\DevOwl\HeadlessContentBlocker\matcher\StyleInlineMatcher|\DevOwl\HeadlessContentBlocker\matcher\StyleInlineAttributeMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\StyleInlineMatch|\DevOwl\HeadlessContentBlocker\finder\match\StyleInlineAttributeMatch | $match |
inlineStyleBlockRule(\DevOwl\HeadlessContentBlocker\BlockedResult $result,string $url,\DevOwl\HeadlessContentBlocker\matcher\StyleInlineMatcher|\DevOwl\HeadlessContentBlocker\matcher\StyleInlineAttributeMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\StyleInlineMatch|\DevOwl\HeadlessContentBlocker\finder\match\StyleInlineAttributeMatch $match): boolean
Decide if a URL in a CSS rule should be blocked.
visualParent(boolean|string|\DevOwl\HeadlessContentBlocker\number $visualParent,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match): boolean|string|\DevOwl\HeadlessContentBlocker\number
Set a visual parent for a specific match.
boolean|string|\DevOwl\HeadlessContentBlocker\number | $visualParent | |
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
blockableStringExpression(string $expression,\DevOwl\HeadlessContentBlocker\AbstractBlockable $blockable): string
Allows to modify the passed string expression to a blockable.
string | $expression | |
\DevOwl\HeadlessContentBlocker\AbstractBlockable | $blockable |
defaults(\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker $headlessContentBlocker)
Append defaults as plugin.
\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker | $headlessContentBlocker |