Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
HTMLPurifier_Strategy_MakeWellFormed Class Reference
Inheritance diagram for HTMLPurifier_Strategy_MakeWellFormed:
HTMLPurifier_Strategy

Public Member Functions

 execute ($tokens, $config, $context)
 

Protected Member Functions

 processToken ($token, $injector=-1)
 Processes arbitrary token values for complicated substitution patterns.
 

Protected Attributes

 $config
 Current instance of HTMLPurifier_Config.
 
 $context
 Current instance of HTMLPurifier_Context.
 
 $injectors
 Injectors active in this stream processing.
 
 $stack
 Current nesting of elements.
 
 $token
 Current token.
 
 $tokens
 Array stream of tokens being processed.
 
 $zipper
 Zipper managing the true state.
 

Member Function Documentation

◆ execute()

HTMLPurifier_Strategy_MakeWellFormed::execute ( $tokens,
$config,
$context )
Parameters
HTMLPurifier_Token[]$tokens
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Return values
HTMLPurifier_Token[]
Exceptions
HTMLPurifier_Exception

Reimplemented from HTMLPurifier_Strategy.

◆ processToken()

HTMLPurifier_Strategy_MakeWellFormed::processToken ( $token,
$injector = -1 )
protected

Processes arbitrary token values for complicated substitution patterns.

In general:

If $token is an array, it is a list of tokens to substitute for the current token. These tokens then get individually processed. If there is a leading integer in the list, that integer determines how many tokens from the stream should be removed.

If $token is a regular token, it is swapped with the current token.

If $token is false, the current token is deleted.

If $token is an integer, that number of tokens (with the first token being the current one) will be deleted.

Parameters
HTMLPurifier_Token | array | int | bool$tokenToken substitution value
HTMLPurifier_Injector | int$injectorInjector that performed the substitution; default is if this is not an injector related operation.
Exceptions
HTMLPurifier_Exception

Member Data Documentation

◆ $config

HTMLPurifier_Strategy_MakeWellFormed::$config
protected

Current instance of HTMLPurifier_Config.

@type HTMLPurifier_Config

◆ $context

HTMLPurifier_Strategy_MakeWellFormed::$context
protected

Current instance of HTMLPurifier_Context.

@type HTMLPurifier_Context

◆ $injectors

HTMLPurifier_Strategy_MakeWellFormed::$injectors
protected

Injectors active in this stream processing.

@type HTMLPurifier_Injector[]

◆ $stack

HTMLPurifier_Strategy_MakeWellFormed::$stack
protected

Current nesting of elements.

@type array

◆ $token

HTMLPurifier_Strategy_MakeWellFormed::$token
protected

Current token.

@type HTMLPurifier_Token

◆ $tokens

HTMLPurifier_Strategy_MakeWellFormed::$tokens
protected

Array stream of tokens being processed.

@type HTMLPurifier_Token[]

◆ $zipper

HTMLPurifier_Strategy_MakeWellFormed::$zipper
protected

Zipper managing the true state.

@type HTMLPurifier_Zipper


The documentation for this class was generated from the following file: