146        $this->elements[] = $element;
 
  163            $this->info[$element]->child = 
$contents;
 
  165        return $this->info[$element];
 
  176        if (!isset($this->info[$element])) {
 
  177            $this->elements[] = $element;
 
  179            $this->info[$element]->standalone = 
false;
 
  181            trigger_error(
"Definition for $element already exists in module, cannot redefine");
 
  183        return $this->info[$element];
 
  194        if (!isset($this->content_sets[
$type])) {
 
  195            $this->content_sets[
$type] = 
'';
 
  197            $this->content_sets[
$type] .= 
' | ';
 
  199        $this->content_sets[
$type] .= $element;
 
  215            return array(
null, 
null);
 
  220                return array(
'empty', 
'');
 
  222                return array(
'optional', 
'Inline | #PCDATA');
 
  224                return array(
'optional', 
'Flow | #PCDATA');
 
  226        list($content_model_type, $content_model) = explode(
':', 
$contents);
 
  227        $content_model_type = strtolower(trim($content_model_type));
 
  228        $content_model = trim($content_model);
 
  229        return array($content_model_type, $content_model);
 
  240        if (!is_array($attr_includes)) {
 
  241            if (empty($attr_includes)) {
 
  242                $attr_includes = array();
 
  244                $attr_includes = array($attr_includes);
 
  247        $attr[0] = $attr_includes;
 
  260        if (is_string(
$list)) {
 
  261            $list = func_get_args();
 
  264        foreach (
$list as $value) {
 
  265            if (is_null($value)) {
 
An exception for terminatinating execution or to throw for unit testing.
Structure that stores an HTML element definition.
static create($content_model, $content_model_type, $attr)
Low-level factory constructor for creating new standalone element defs.
Represents an XHTML 1.1 module, with information on elements, tags and attributes.
$name
Short unique string identifier of the module.
getChildDef($def)
Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type membe...
$safe
Boolean flag whether or not this module is safe.
makeLookup($list)
Convenience function that generates a lookup table with boolean true as value.
addElementToContentSet($element, $type)
Convenience function that registers an element to a content set.
addBlankElement($element)
Convenience function that creates a totally blank, non-standalone element.
$elements
Informally, a list of elements this module changes.
mergeInAttrIncludes(&$attr, $attr_includes)
Convenience function that merges a list of attribute includes into an attribute array.
$info_injector
List of HTMLPurifier_Injector to be performed during well-formedness fixing.
$defines_child_def
Boolean flag that indicates whether or not getChildDef is implemented.
$attr_collections
Associative array of attribute collection names to attribute collection additions.
$info_attr_transform_pre
List of HTMLPurifier_AttrTransform to be performed before validation.
$info
Associative array of element names to element definitions.
$content_sets
Associative array of content set names to content set additions.
$info_tag_transform
Associative array of deprecated tag name to HTMLPurifier_TagTransform.
setup($config)
Lazy load construction of the module after determining whether or not it's needed,...
parseContents($contents)
Convenience function that transforms single-string contents into separate content model and content m...
$info_attr_transform_post
List of HTMLPurifier_AttrTransform to be performed after validation.
addElement($element, $type, $contents, $attr_includes=array(), $attr=array())
Convenience function that sets up a new element.
if(isset($_REQUEST['delete'])) $list