< HTMLPurifier_AttrTransform > Protocol Reference

Processes an entire attribute array for corrections needing multiple values. More...

List of all members.

Public Member Functions

 transform ($attr, $config, $context)
 Abstract: makes changes to the attributes dependent on multiple values.
 prependCSS (&$attr, $css)
 Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
 confiscateAttr (&$attr, $key)
 Retrieves and removes an attribute.
 transform ($attr, $config, $context)
 Abstract: makes changes to the attributes dependent on multiple values.
 prependCSS (&$attr, $css)
 Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
 confiscateAttr (&$attr, $key)
 Retrieves and removes an attribute.


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

HTMLPurifier_AttrTransform-p::transform ( attr,
config,
context 
) [abstract]

Abstract: makes changes to the attributes dependent on multiple values.

Parameters:
$attr Assoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr
$config Mandatory HTMLPurifier_Config object.
$context Mandatory HTMLPurifier_Context object
Returns:
Processed attribute array.

HTMLPurifier_AttrTransform-p::prependCSS ( &$  attr,
css 
)

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

Parameters:
$attr Attribute array to process (passed by reference)
$css CSS to prepend

Definition at line 37 of file AttrTransform.php.

HTMLPurifier_AttrTransform-p::confiscateAttr ( &$  attr,
key 
)

Retrieves and removes an attribute.

Parameters:
$attr Attribute array to process (passed by reference)
$key Key of attribute to confiscate

Definition at line 47 of file AttrTransform.php.

HTMLPurifier_AttrTransform-p::transform ( attr,
config,
context 
) [abstract]

Abstract: makes changes to the attributes dependent on multiple values.

Parameters:
$attr Assoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr
$config Mandatory HTMLPurifier_Config object.
$context Mandatory HTMLPurifier_Context object
Returns:
Processed attribute array.

HTMLPurifier_AttrTransform-p::prependCSS ( &$  attr,
css 
)

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

Parameters:
$attr Attribute array to process (passed by reference)
$css CSS to prepend

Definition at line 507 of file HTMLPurifier.standalone.php.

HTMLPurifier_AttrTransform-p::confiscateAttr ( &$  attr,
key 
)

Retrieves and removes an attribute.

Parameters:
$attr Attribute array to process (passed by reference)
$key Key of attribute to confiscate

Definition at line 517 of file HTMLPurifier.standalone.php.


The documentation for this protocol was generated from the following files:
Generated on Thu Jun 19 18:47:29 2008 for HTMLPurifier by  doxygen 1.5.3