\DevOwl\FastHtmlTagFastHtmlTag

Initialize a new parser.

Summary

Methods
Properties
Constants
__construct()
addFinder()
addCallback()
addSelectorSyntaxFunction()
modifyAny()
modifyHtml()
getSelectorSyntaxFunction()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$callbacks
$selectorSyntaxFunctions
$finder
N/A

Properties

$callbacks

$callbacks :array<mixed,callable>

Callbacks.

Type

array<mixed,callable>

$selectorSyntaxFunctions

$selectorSyntaxFunctions :array<mixed,callable>

Callbacks for `SelectorSyntaxAttributeFunction`.

Type

array<mixed,callable>

Methods

__construct()

__construct()

C'tor.

addCallback()

addCallback(callable  $callback)

Add a callable. The first parameter is the HTML string and should return HTML.

Parameters

callable $callback

addSelectorSyntaxFunction()

addSelectorSyntaxFunction(string  $functionName,callable  $callback)

Add a callable for a Selector Syntax function.

The callback gets the following parameters and expects boolean as result:

SelectorSyntaxAttributeFunction $function, SelectorSyntaxMatch $match, mixed $value

Parameters

string $functionName
callable $callback

modifyAny()

modifyAny(string  $mixed)

Allows to parse and modify any content. This could be e.g. a JSON string (each value gets iterated and parsed if it is a HTML).

Parameters

string $mixed

modifyHtml()

modifyHtml(string  $html)

Allow to parse and modify a given HTML string.

Parameters

string $html

getSelectorSyntaxFunction()

getSelectorSyntaxFunction(string  $functionName)

Get a defined selector syntax function by name.

Parameters

string $functionName