\DevOwl\HeadlessContentBlocker\matcherCssHelper

Helper functionality for CSS documents.

Summary

Methods
Properties
Constants
removeBlanksFromCSSList()
strposValues()
renderableString()
getCompactOutputFormat()
removeValueFromDocument()
applyLocationChangeSet()
removeNonBlockedRulesFromDocument()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

removeBlanksFromCSSList()

removeBlanksFromCSSList(\Sabberworm\CSS\CSSList\CSSList  $oList)

Remove blanks from a CSS List.

Parameters

\Sabberworm\CSS\CSSList\CSSList $oList

strposValues()

strposValues(string|\Sabberworm\CSS\Renderable  $haystack,string|\Sabberworm\CSS\Renderable  $needle)

`strpos` two given values from our CSS Document.

Parameters

string|\Sabberworm\CSS\Renderable $haystack

The string to search in

string|\Sabberworm\CSS\Renderable $needle

The searched string

renderableString()

renderableString(string|\Sabberworm\CSS\Renderable  $renderable)

Probably `render` a `Renderable`.

Parameters

string|\Sabberworm\CSS\Renderable $renderable

getCompactOutputFormat()

getCompactOutputFormat()

Get the compact output format for our parser.

removeValueFromDocument()

removeValueFromDocument(mixed  $value,\Sabberworm\CSS\CSSList\Document  $document)

Remove a given CSS value from a given document and return the removed elements.

Parameters

mixed $value
\Sabberworm\CSS\CSSList\Document $document

applyLocationChangeSet()

applyLocationChangeSet(array  $setUrlChanges,\Sabberworm\CSS\CSSList\Document  $document)

Apply URLs changes to document.

Parameters

array $setUrlChanges

Result of StyleInlineMatcher::generateLocationChangeSet

\Sabberworm\CSS\CSSList\Document $document

removeNonBlockedRulesFromDocument()

removeNonBlockedRulesFromDocument(\Sabberworm\CSS\CSSList\Document  $document,array  $removedFromOriginalDocument,array<mixed,\Sabberworm\CSS\RuleSet\RuleSet>  $removedRuleSetsFromOriginalDocument)

Remove all non-blocked rules depending on a "removal" list.

Parameters

\Sabberworm\CSS\CSSList\Document $document
array $removedFromOriginalDocument
array<mixed,\Sabberworm\CSS\RuleSet\RuleSet> $removedRuleSetsFromOriginalDocument