HTMLPurifier_Config::getHTMLDefinition PHP Method

getHTMLDefinition() public method

Retrieves object reference to the HTML definition.
public getHTMLDefinition ( boolean $raw = false, boolean $optimized = false ) : HTMLPurifier_HTMLDefinition
$raw boolean Return a copy that has not been setup yet. Must be called before it's been setup, otherwise won't work.
$optimized boolean If true, this method may return null, to indicate that a cached version of the modified definition object is available and no further edits are necessary. Consider using maybeGetRawHTMLDefinition, which is more explicitly named, instead.
return HTMLPurifier_HTMLDefinition
    public function getHTMLDefinition($raw = false, $optimized = false)
    {
        return $this->getDefinition('HTML', $raw, $optimized);
    }

Usage Example

Example #1
0
 /**
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  */
 public function __construct($config, $context)
 {
     $this->config = $config;
     $this->_scriptFix = $config->get('Output.CommentScriptContents');
     $this->_innerHTMLFix = $config->get('Output.FixInnerHTML');
     $this->_sortAttr = $config->get('Output.SortAttr');
     $this->_flashCompat = $config->get('Output.FlashCompat');
     $this->_def = $config->getHTMLDefinition();
     $this->_xhtml = $this->_def->doctype->xml;
 }
All Usage Examples Of HTMLPurifier_Config::getHTMLDefinition