Moodle  2.2.1
http://www.collinsharper.com
HTMLPurifier_AttrTransform Class Reference
Inheritance diagram for HTMLPurifier_AttrTransform:

Public Member Functions

 transform ($attr, $config, $context)
 prependCSS (&$attr, $css)
 confiscateAttr (&$attr, $key)

Detailed Description

Processes an entire attribute array for corrections needing multiple values.

Occasionally, a certain attribute will need to be removed and popped onto another value. Instead of creating a complex return syntax for HTMLPurifier_AttrDef, we just pass the whole attribute array to a specialized object and have that do the special work. That is the family of HTMLPurifier_AttrTransform.

An attribute transformation can be assigned to run before or after HTMLPurifier_AttrDef validation. See HTMLPurifier_HTMLDefinition for more details.

Definition at line 17 of file AttrTransform.php.


Member Function Documentation

confiscateAttr ( &$  attr,
key 
)

Retrieves and removes an attribute

Parameters:
$attrAttribute array to process (passed by reference)
$keyKey of attribute to confiscate

Definition at line 47 of file AttrTransform.php.

Here is the caller graph for this function:

prependCSS ( &$  attr,
css 
)

Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.

Parameters:
$attrAttribute array to process (passed by reference)
$cssCSS to prepend

Definition at line 37 of file AttrTransform.php.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations