HumHub Documentation (unofficial)

HTMLPurifier_ContentSets
in package

Tags
todo

Unit test

Table of Contents

Properties

$info  : mixed
List of content set strings (pipe separators) indexed by name.
$lookup  : mixed
List of content set lookups (element => true) indexed by name.
$keys  : mixed
Synchronized list of defined content sets (keys of info).
$values  : mixed
Synchronized list of defined content values (values of info).

Methods

__construct()  : mixed
Merges in module's content sets, expands identifiers in the content sets and populates the keys, values and lookup member variables.
generateChildDef()  : mixed
Accepts a definition; generates and assigns a ChildDef for it
generateChildDefCallback()  : mixed
getChildDef()  : HTMLPurifier_ChildDef
Instantiates a ChildDef based on content_model and content_model_type member variables in HTMLPurifier_ElementDef
convertToLookup()  : array<string|int, mixed>
Converts a string list of elements separated by pipes into a lookup array.

Properties

$info

List of content set strings (pipe separators) indexed by name.

public mixed $info = array()
Tags
type

array

$lookup

List of content set lookups (element => true) indexed by name.

public mixed $lookup = array()
Tags
type

array

note

This is in HTMLPurifier_HTMLDefinition->info_content_sets

$keys

Synchronized list of defined content sets (keys of info).

protected mixed $keys = array()
Tags
type

array

$values

Synchronized list of defined content values (values of info).

protected mixed $values = array()
Tags
type

array

Methods

__construct()

Merges in module's content sets, expands identifiers in the content sets and populates the keys, values and lookup member variables.

public __construct(array<string|int, HTMLPurifier_HTMLModule$modules) : mixed
Parameters
$modules : array<string|int, HTMLPurifier_HTMLModule>

List of HTMLPurifier_HTMLModule

generateChildDefCallback()

public generateChildDefCallback(mixed $matches) : mixed
Parameters
$matches : mixed

getChildDef()

Instantiates a ChildDef based on content_model and content_model_type member variables in HTMLPurifier_ElementDef

public getChildDef(HTMLPurifier_ElementDef $def, HTMLPurifier_HTMLModule $module) : HTMLPurifier_ChildDef
Parameters
$def : HTMLPurifier_ElementDef

HTMLPurifier_ElementDef to have ChildDef extracted

$module : HTMLPurifier_HTMLModule

Module that defined the ElementDef

Tags
note

This will also defer to modules for custom HTMLPurifier_ChildDef subclasses that need content set expansion

Return values
HTMLPurifier_ChildDef

corresponding to ElementDef

convertToLookup()

Converts a string list of elements separated by pipes into a lookup array.

protected convertToLookup(string $string) : array<string|int, mixed>
Parameters
$string : string

List of elements

Return values
array<string|int, mixed>

Lookup array of elements


        
On this page

Search results