HumHub Documentation (unofficial)

HTMLPurifier_DoctypeRegistry
in package

Table of Contents

Properties

$aliases  : mixed
Lookup table of aliases to real doctype names.
$doctypes  : mixed
Hash of doctype names to doctype objects.

Methods

get()  : HTMLPurifier_Doctype
Retrieves reference to a doctype of a certain name
getDoctypeFromConfig()  : string
Retrieves the doctype from the configuration object
make()  : HTMLPurifier_Doctype
Creates a doctype based on a configuration object, will perform initialization on the doctype
register()  : HTMLPurifier_Doctype
Registers a doctype to the registry

Properties

$aliases

Lookup table of aliases to real doctype names.

protected mixed $aliases
Tags
type

array

$doctypes

Hash of doctype names to doctype objects.

protected mixed $doctypes
Tags
type

array

Methods

get()

Retrieves reference to a doctype of a certain name

public get(string $doctype) : HTMLPurifier_Doctype
Parameters
$doctype : string

Name of doctype

Tags
note

This function resolves aliases

note

When possible, use the more fully-featured make()

Return values
HTMLPurifier_Doctype

Editable doctype object

register()

Registers a doctype to the registry

public register(string $doctype[, bool $xml = true ][, array<string|int, mixed> $modules = array() ][, array<string|int, mixed> $tidy_modules = array() ][, array<string|int, mixed> $aliases = array() ][, string $dtd_public = null ][, string $dtd_system = null ]) : HTMLPurifier_Doctype
Parameters
$doctype : string

Name of doctype or literal doctype object

$xml : bool = true
$modules : array<string|int, mixed> = array()

Modules doctype will load

$tidy_modules : array<string|int, mixed> = array()

Modules doctype will load for certain modes

$aliases : array<string|int, mixed> = array()

Alias names for doctype

$dtd_public : string = null
$dtd_system : string = null
Tags
note

Accepts a fully-formed doctype object, or the parameters for constructing a doctype object

Return values
HTMLPurifier_Doctype

Editable registered doctype


        
On this page

Search results