HTMLPurifier_Strategy
in package
AbstractYes
Supertype for classes that define a strategy for modifying/purifying tokens.
While HTMLPurifier's core purpose is fixing HTML into something proper, strategies provide plug points for extra configuration or even extra features, such as custom tags, custom parsing of text, etc.
Table of Contents
Methods
- execute() : array<string|int, HTMLPurifier_Token>
- Executes the strategy on the tokens.
Methods
execute()
Executes the strategy on the tokens.
public
abstract execute(array<string|int, HTMLPurifier_Token> $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context) : array<string|int, HTMLPurifier_Token>
Parameters
- $tokens : array<string|int, HTMLPurifier_Token>
-
Array of HTMLPurifier_Token objects to be operated on.
- $config : HTMLPurifier_Config
- $context : HTMLPurifier_Context
Return values
array<string|int, HTMLPurifier_Token> —Processed array of token objects.