PHP Class HTMLPurifier_Strategy_MakeWellFormed, yii

Specification of the armor attributes this strategy uses: - MakeWellFormed_TagClosedError: This armor field is used to suppress tag closed errors for certain tokens [TagClosedSuppress], in particular, if a tag was generated automatically by HTML Purifier, we may rely on our infrastructure to close it for us and shouldn't report an error to the user [TagClosedAuto].
Inheritance: extends HTMLPurifier_Strategy
Datei anzeigen Open project: yiisoft/yii

Protected Properties

Property Type Description
$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.

Public Methods

Method Description
execute ( HTMLPurifier_Token[] $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : HTMLPurifier_Token[]

Protected Methods

Method Description
processToken ( HTMLPurifier_Token | array | integer | boolean $token, HTMLPurifier_Injector | integer $injector ) Processes arbitrary token values for complicated substitution patterns.

Private Methods

Method Description
insertBefore ( HTMLPurifier_Token $token ) Inserts a token before the current token. Cursor now points to this token. You must reprocess after this.
remove ( ) Removes current token. Cursor now points to new token occupying previously occupied space. You must reprocess after this.

Method Details

execute() public method

public execute ( HTMLPurifier_Token[] $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : HTMLPurifier_Token[]
$tokens HTMLPurifier_Token[]
$config HTMLPurifier_Config
$context HTMLPurifier_Context
return HTMLPurifier_Token[]

processToken() protected method

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.
protected processToken ( HTMLPurifier_Token | array | integer | boolean $token, HTMLPurifier_Injector | integer $injector )
$token HTMLPurifier_Token | array | integer | boolean Token substitution value
$injector HTMLPurifier_Injector | integer Injector that performed the substitution; default is if this is not an injector related operation.

Property Details

$config protected_oe property

Current instance of HTMLPurifier_Config.
protected $config

$context protected_oe property

Current instance of HTMLPurifier_Context.
protected $context

$injectors protected_oe property

Injectors active in this stream processing.
protected $injectors

$stack protected_oe property

Current nesting of elements.
protected $stack

$token protected_oe property

Current token.
protected $token

$tokens protected_oe property

Array stream of tokens being processed.
protected $tokens

$zipper protected_oe property

Zipper managing the true state.
protected $zipper