HTMLPurifier_Config::getCSSDefinition PHP Method

getCSSDefinition() public method

Retrieves object reference to the CSS definition
public getCSSDefinition ( boolean $raw = false, boolean $optimized = false ) : HTMLPurifier_CSSDefinition
$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 maybeGetRawCSSDefinition, which is more explicitly named, instead.
return HTMLPurifier_CSSDefinition
    public function getCSSDefinition($raw = false, $optimized = false)
    {
        return $this->getDefinition('CSS', $raw, $optimized);
    }

Usage Example

Example #1
0
 /**
  * @param HTMLPurifier_Config $config
  */
 public function __construct($config)
 {
     $def = $config->getCSSDefinition();
     $this->info['list-style-type'] = $def->info['list-style-type'];
     $this->info['list-style-position'] = $def->info['list-style-position'];
     $this->info['list-style-image'] = $def->info['list-style-image'];
 }
All Usage Examples Of HTMLPurifier_Config::getCSSDefinition