\DevOwl\FastHtmlTag\finderStyleInlineFinder

Find inline styles.

Summary

Methods
Properties
Constants
getRegularExpression()
createMatch()
replace()
addCallback()
setFastHtmlTag()
getCallbacks()
getFastHtmlTag()
__construct()
prepareMatch()
No public properties found
STYLE_INLINE_REGEXP
applyCallbacks()
No protected properties found
N/A
No private methods found
$fastHtmlTag
$callbacks
N/A

Constants

STYLE_INLINE_REGEXP

STYLE_INLINE_REGEXP ='/<style([^>]*)>([^<]*(?:<(?![\\\\]*\/style>)[^<]*)*)<([\\\\]*)\/style>/mixs'

Inline styles are completely different than usual URL `link`s. We need to get all available inline styles, scrape their content and check if it needs to blocked.

Available matches: $match[0] => Full string $match[1] => Attributes string after <style $match[2] => Full inline style $match[3] => Empty or \ if style is escaped

Properties

$callbacks

$callbacks :array<mixed,callable>

Callbacks.

Type

array<mixed,callable>

Methods

getRegularExpression()

getRegularExpression()

Get regular expression.

createMatch()

createMatch(array  $m): \DevOwl\FastHtmlTag\finder\match\AbstractMatch|false

See `AbstractRegexFinder`.

Parameters

array $m

Returns

\DevOwl\FastHtmlTag\finder\match\AbstractMatch|false —

Returns false if no match got found and we cannot process it

replace()

replace(string  $html)

Find HTML tags for this finder and replace it with our modifiers.

Parameters

string $html

addCallback()

addCallback(callable  $callback)

Add a callable. The first parameter is an instance of `AbstractMatch`.

Parameters

callable $callback

getCallbacks()

getCallbacks()

Getter.

getFastHtmlTag()

getFastHtmlTag()

Getter.

__construct()

__construct()

C'tor.

prepareMatch()

prepareMatch(array  $m)

Prepare the result match of a `createRegexp` regexp.

Parameters

array $m