IGNORE_LINK_REL
IGNORE_LINK_REL =array('profile', 'author', 'shortlink', 'canonical')
Provide a scanner for our content blocker. That means, you can pass `ScannableBlockable` instances to your `HeadlessContentBlocker` instance and you can continually fetch the scanned blockables from this plugin instance.
$results :array<mixed,\DevOwl\HeadlessContentBlocker\plugins\scanner\ScanEntry>
Scan results.
__construct(\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker $headlessContentBlocker)
C'tor.
\DevOwl\HeadlessContentBlocker\HeadlessContentBlocker | $headlessContentBlocker |
beforeMatch(\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match)
See `AbstractPlugin`.
\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher | $matcher | |
\DevOwl\FastHtmlTag\finder\match\AbstractMatch | $match |
blockedMatch(\DevOwl\HeadlessContentBlocker\BlockedResult $result,\DevOwl\HeadlessContentBlocker\matcher\AbstractMatcher $matcher,\DevOwl\FastHtmlTag\finder\match\AbstractMatch $match)
See `AbstractPlugin`.
\DevOwl\HeadlessContentBlocker\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)
See `AbstractPlugin`. Needed to obtain external URLs.
\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 |
processBlockedByTagAttributeMatch(\DevOwl\HeadlessContentBlocker\BlockedResult $isBlocked,string $linkAttribute,string $link)
Memorize when a content got blocked through a non-created preset.
\DevOwl\HeadlessContentBlocker\BlockedResult | $isBlocked | |
string | $linkAttribute | |
string | $link |
processBlockedByScriptInlineMatch(\DevOwl\HeadlessContentBlocker\BlockedResult $isBlocked)
Memorize when an inline script got blocked through a non-created preset.
\DevOwl\HeadlessContentBlocker\BlockedResult | $isBlocked |
processBlockedBySelectorSyntax(\DevOwl\HeadlessContentBlocker\BlockedResult $isBlocked,\DevOwl\FastHtmlTag\finder\match\SelectorSyntaxMatch $m)
Memorize when a custom element by CSS Selector got blocked through a non-created preset.
\DevOwl\HeadlessContentBlocker\BlockedResult | $isBlocked | |
\DevOwl\FastHtmlTag\finder\match\SelectorSyntaxMatch | $m |
probablyMemorizeExternalUrl(\DevOwl\HeadlessContentBlocker\BlockedResult $isBlocked,string $url,string $tag,string $attribute,\DevOwl\HeadlessContentBlocker\Markup|null $markup)
Probably memorize an external URL when it got not blocked through preset nor created content blocker.
\DevOwl\HeadlessContentBlocker\BlockedResult | $isBlocked | |
string | $url | |
string | $tag | |
string | $attribute | |
\DevOwl\HeadlessContentBlocker\Markup|null | $markup |
probablyMemorizeIsBlocked(\DevOwl\HeadlessContentBlocker\BlockedResult $isBlocked,string $url,string $tag,string $attribute)
Probably memorize a blocked content.
\DevOwl\HeadlessContentBlocker\BlockedResult | $isBlocked | |
string | $url | |
string | $tag | |
string | $attribute |