SKIP_VARIABLES_IF_REGEXP_START
SKIP_VARIABLES_IF_REGEXP_START ='/((var|const|let)\s+)?[A-Za-z0-9_\.\[\]"\']+\s?=\s+?{/'
If an inline script starts with a given expression, let's test the complete script if it is a variable (CDATA).
Match defining a `ScriptInlineFinder` match.
__construct(\DevOwl\FastHtmlTag\finder\ScriptInlineFinder $finder,string $originalMatch,array $attributes,string $script)
C'tor.
\DevOwl\FastHtmlTag\finder\ScriptInlineFinder | $finder | |
string | $originalMatch | |
array | $attributes | |
string | $script |
calculateUniqueKey(array<mixed,string> $idKeys = array('id'),array<mixed,string[]> $looseAttributes = array()): string|null
Calculate a unique key for this match.
array<mixed,string> | $idKeys | Consider ID keys as unique (ordered by priority) |
array<mixed,string[]> | $looseAttributes |
Can return null
if we cannot calculate a unique key for this container
getFinder(): \DevOwl\FastHtmlTag\finder\ScriptInlineFinder
Getter.
isScriptOnlyVariableAssignment(array<mixed,string> $variableNames = array(),boolean $compute = true)
Check if the script only contains a variable assignment.
array<mixed,string> | $variableNames | Pass an optional array of variable names or regular expressions |
boolean | $compute | If |