ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
HTMLPurifier_HTMLModule_Text Class Reference

XHTML 1.1 Text Module, defines basic text containers. More...

+ Inheritance diagram for HTMLPurifier_HTMLModule_Text:
+ Collaboration diagram for HTMLPurifier_HTMLModule_Text:

Public Member Functions

 setup ($config)
 Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.
- Public Member Functions inherited from HTMLPurifier_HTMLModule
 getChildDef ($def)
 Retrieves a proper HTMLPurifier_ChildDef subclass based on content_model and content_model_type member variables of the HTMLPurifier_ElementDef class.
 addElement ($element, $type, $contents, $attr_includes=array(), $attr=array())
 Convenience function that sets up a new element.
 addBlankElement ($element)
 Convenience function that creates a totally blank, non-standalone element.
 addElementToContentSet ($element, $type)
 Convenience function that registers an element to a content set.
 parseContents ($contents)
 Convenience function that transforms single-string contents into separate content model and content model type.
 mergeInAttrIncludes (&$attr, $attr_includes)
 Convenience function that merges a list of attribute includes into an attribute array.
 makeLookup ($list)
 Convenience function that generates a lookup table with boolean true as value.

Data Fields

 $name = 'Text'
 $content_sets
- Data Fields inherited from HTMLPurifier_HTMLModule
 $name
 Short unique string identifier of the module.
 $elements = array()
 Informally, a list of elements this module changes.
 $info = array()
 Associative array of element names to element definitions.
 $content_sets = array()
 Associative array of content set names to content set additions.
 $attr_collections = array()
 Associative array of attribute collection names to attribute collection additions.
 $info_tag_transform = array()
 Associative array of deprecated tag name to HTMLPurifier_TagTransform.
 $info_attr_transform_pre = array()
 List of HTMLPurifier_AttrTransform to be performed before validation.
 $info_attr_transform_post = array()
 List of HTMLPurifier_AttrTransform to be performed after validation.
 $info_injector = array()
 List of HTMLPurifier_Injector to be performed during well-formedness fixing.
 $defines_child_def = false
 Boolean flag that indicates whether or not getChildDef is implemented.
 $safe = true
 Boolean flag whether or not this module is safe.

Detailed Description

XHTML 1.1 Text Module, defines basic text containers.

Core Module.

Note
In the normative XML Schema specification, this module is further abstracted into the following modules:
  • Block Phrasal (address, blockquote, pre, h1, h2, h3, h4, h5, h6)
  • Block Structural (div, p)
  • Inline Phrasal (abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var)
  • Inline Structural (br, span) This module, functionally, does not distinguish between these sub-modules, but the code is internally structured to reflect these distinctions.

Definition at line 15 of file Text.php.

Member Function Documentation

HTMLPurifier_HTMLModule_Text::setup (   $config)

Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.

Parameters
$configInstance of HTMLPurifier_Config

Reimplemented from HTMLPurifier_HTMLModule.

Definition at line 23 of file Text.php.

References HTMLPurifier_HTMLModule\addElement(), and HTMLPurifier_HTMLModule\makeLookup().

{
// Inline Phrasal -------------------------------------------------
$this->addElement('abbr', 'Inline', 'Inline', 'Common');
$this->addElement('acronym', 'Inline', 'Inline', 'Common');
$this->addElement('cite', 'Inline', 'Inline', 'Common');
$this->addElement('dfn', 'Inline', 'Inline', 'Common');
$this->addElement('kbd', 'Inline', 'Inline', 'Common');
$this->addElement('q', 'Inline', 'Inline', 'Common', array('cite' => 'URI'));
$this->addElement('samp', 'Inline', 'Inline', 'Common');
$this->addElement('var', 'Inline', 'Inline', 'Common');
$em = $this->addElement('em', 'Inline', 'Inline', 'Common');
$em->formatting = true;
$strong = $this->addElement('strong', 'Inline', 'Inline', 'Common');
$strong->formatting = true;
$code = $this->addElement('code', 'Inline', 'Inline', 'Common');
$code->formatting = true;
// Inline Structural ----------------------------------------------
$this->addElement('span', 'Inline', 'Inline', 'Common');
$this->addElement('br', 'Inline', 'Empty', 'Core');
// Block Phrasal --------------------------------------------------
$this->addElement('address', 'Block', 'Inline', 'Common');
$this->addElement('blockquote', 'Block', 'Optional: Heading | Block | List', 'Common', array('cite' => 'URI') );
$pre = $this->addElement('pre', 'Block', 'Inline', 'Common');
$pre->excludes = $this->makeLookup(
'img', 'big', 'small', 'object', 'applet', 'font', 'basefont' );
$this->addElement('h1', 'Heading', 'Inline', 'Common');
$this->addElement('h2', 'Heading', 'Inline', 'Common');
$this->addElement('h3', 'Heading', 'Inline', 'Common');
$this->addElement('h4', 'Heading', 'Inline', 'Common');
$this->addElement('h5', 'Heading', 'Inline', 'Common');
$this->addElement('h6', 'Heading', 'Inline', 'Common');
// Block Structural -----------------------------------------------
$p = $this->addElement('p', 'Block', 'Inline', 'Common');
$p->autoclose = array_flip(array("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "ol", "p", "ul"));
$this->addElement('div', 'Block', 'Flow', 'Common');
}

+ Here is the call graph for this function:

Field Documentation

HTMLPurifier_HTMLModule_Text::$content_sets
Initial value:
array(
'Flow' => 'Heading | Block | Inline'
)

Definition at line 19 of file Text.php.

HTMLPurifier_HTMLModule_Text::$name = 'Text'

Definition at line 18 of file Text.php.


The documentation for this class was generated from the following file: