$setup
$setup
Has setup() been called yet?
Definition of the purified HTML that describes allowed children, attributes, and many other things.
Conventions:
All member variables that are prefixed with info (including the main $info array) are used by HTML Purifier internals and should not be directly edited when customizing the HTMLDefinition. They can usually be set via configuration directives or custom modules.
On the other hand, member variables without the info prefix are used internally by the HTMLDefinition and MUST NOT be used by other HTML Purifier internals. Many of them, however, are public, and may be edited by userspace code to tweak the behavior of HTMLDefinition.
$optimized
If true, write out the final definition object to the cache after setup. This will be true only if all invocations to get a raw definition object are also optimized. This does not cause file system thrashing because on subsequent calls the cached object is used and any writes to the raw definition object are short circuited. See enduser-customize.html for the high-level picture.
addAttribute(string $element_name, string $attr_name, mixed $def) : mixed
Adds a custom attribute to a pre-existing element
string | $element_name | Element name to add attribute to |
string | $attr_name | Name of attribute |
mixed | $def | Attribute definition, can be string or object, see HTMLPurifier_AttrTypes for details |