PHP Класс HTMLPurifier_HTMLModuleManager, yii

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$attrCollections
$attrTypes
$contentSets
$doctype Instance of current doctype.
$doctypes
$elementLookup Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled.
$modules Active instances of modules for the specified doctype are indexed, by name, in this array.
$prefixes List of prefixes we should use for registering small names.
$registeredModules Array of recognized HTMLPurifier_HTMLModule instances, indexed by module's class name. This array is usually lazy loaded, but a user can overload a module by pre-emptively registering it.
$trusted If set to true, unsafe elements and attributes will be allowed.
$userModules List of extra modules that were added by the user using addModule(). These get unconditionally merged into the current doctype, whatever it may be.

Открытые методы

Метод Описание
__construct ( )
addModule ( $module ) Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype
addPrefix ( $prefix ) Adds a class prefix that registerModule() will use to resolve a string name to a concrete class
getElement ( string $name, boolean $trusted = null ) : HTMLPurifier_ElementDef Retrieves a single merged element definition
getElements ( ) : Array Retrieves merged element definitions.
processModule ( $module ) Takes a module and adds it to the active module collection, registering it if necessary.
registerModule ( $module, $overload = false ) Registers a module to the recognized module list, useful for overloading pre-existing modules.
setup ( HTMLPurifier_Config $config ) Performs processing on modules, after being called you may use getElement() and getElements()

Описание методов

__construct() публичный Метод

public __construct ( )

addModule() публичный Метод

Adds a module to the current doctype by first registering it, and then tacking it on to the active doctype
public addModule ( $module )

addPrefix() публичный Метод

Adds a class prefix that registerModule() will use to resolve a string name to a concrete class
public addPrefix ( $prefix )

getElement() публичный Метод

Retrieves a single merged element definition
public getElement ( string $name, boolean $trusted = null ) : HTMLPurifier_ElementDef
$name string Name of element
$trusted boolean Boolean trusted overriding parameter: set to true if you want the full version of an element
Результат HTMLPurifier_ElementDef Merged HTMLPurifier_ElementDef

getElements() публичный Метод

Retrieves merged element definitions.
public getElements ( ) : Array
Результат Array of HTMLPurifier_ElementDef

processModule() публичный Метод

Takes a module and adds it to the active module collection, registering it if necessary.
public processModule ( $module )

registerModule() публичный Метод

Registers a module to the recognized module list, useful for overloading pre-existing modules.
public registerModule ( $module, $overload = false )
$module Mixed: string module name, with or without HTMLPurifier_HTMLModule prefix, or instance of subclass of HTMLPurifier_HTMLModule.
$overload Boolean whether or not to overload previous modules. If this is not set, and you do overload a module, HTML Purifier will complain with a warning.

setup() публичный Метод

Performs processing on modules, after being called you may use getElement() and getElements()
public setup ( HTMLPurifier_Config $config )
$config HTMLPurifier_Config

Описание свойств

$attrCollections публичное свойство

public $attrCollections

$attrTypes публичное свойство

public $attrTypes

$contentSets публичное свойство

public $contentSets

$doctype публичное свойство

Instance of current doctype.
public $doctype

$doctypes публичное свойство

public $doctypes

$elementLookup публичное свойство

Associative array of element name to list of modules that have definitions for the element; this array is dynamically filled.
public $elementLookup

$modules публичное свойство

Active instances of modules for the specified doctype are indexed, by name, in this array.
public $modules

$prefixes публичное свойство

List of prefixes we should use for registering small names.
public $prefixes

$registeredModules публичное свойство

Array of recognized HTMLPurifier_HTMLModule instances, indexed by module's class name. This array is usually lazy loaded, but a user can overload a module by pre-emptively registering it.
public $registeredModules

$trusted публичное свойство

If set to true, unsafe elements and attributes will be allowed.
public $trusted

$userModules публичное свойство

List of extra modules that were added by the user using addModule(). These get unconditionally merged into the current doctype, whatever it may be.
public $userModules