Public Member Functions | Protected Attributes

Robo47_Application_Resource_HtmlPurifier Class Reference

List of all members.

Public Member Functions

 _setupHtmlpurifier ($options)
 Setup HTMLPurifier.
 getHtmlPurifier ()
 Get HTMLPurifier.
 init ()

Protected Attributes

 $_htmlpurifier = null

Detailed Description

Definition at line 33 of file HtmlPurifier.php.


Member Function Documentation

Robo47_Application_Resource_HtmlPurifier::_setupHtmlpurifier ( options  ) 

Setup HTMLPurifier.

Parameters:
array $options

Definition at line 57 of file HtmlPurifier.php.

Referenced by init().

    {
        $config = HTMLPurifier_Config::createDefault();

        foreach ($options['options'] as $option => $value) {
            $config->set($option, $value);
        }

        $purifier = new HTMLPurifier($config);

        if (isset($options['registryKey'])) {
            Zend_Registry::set($options['registryKey'], $purifier);
        }

        return $purifier;
    }

Here is the caller graph for this function:

Robo47_Application_Resource_HtmlPurifier::getHtmlPurifier (  ) 

Get HTMLPurifier.

Returns:
HTMLPurifier

Definition at line 79 of file HtmlPurifier.php.

    {
        return $this->_htmlpurifier;
    }

Robo47_Application_Resource_HtmlPurifier::init (  ) 

Definition at line 42 of file HtmlPurifier.php.

References _setupHtmlpurifier().

    {
        if (!empty($this->_options)) {
            $this->_htmlpurifier = $this->_setupHtmlpurifier($this->_options);
        } else {
            $message = 'Empty options in resource ' .
                'Robo47_Application_Resource_HtmlPurifier.';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }

Here is the call graph for this function:


Member Data Documentation

Robo47_Application_Resource_HtmlPurifier::$_htmlpurifier = null [protected]

Definition at line 40 of file HtmlPurifier.php.


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