src/Lib/Purifier.php
public static function getPurifierInstance($configName = 'default')
    {
        $_this = Purifier::getInstance();

        if (!isset($_this->_instances[$configName])) {
            if (!isset($_this->_configs[$configName])) {
                throw new \InvalidArgumentException(sprintf('Configuration and instance `%s` does not exist!', $configName));
            }
            $_this->_instances[$configName] = new \HTMLPurifier($_this->_configs[$configName]);
        }

        return $_this->_instances[$configName];
    }
public static function getPurifierInstance($configName = 'default')
    {
        $_this = Purifier::getInstance();

        if (!isset($_this->_instances[$configName])) {
            if (!isset($_this->_configs[$configName])) {
                throw new \InvalidArgumentException(sprintf('Configuration and instance `%s` does not exist!', $configName));
            }
            $_this->_instances[$configName] = new \HTMLPurifier($_this->_configs[$configName]);
        }

        return $_this->_instances[$configName];
    }
public static function getPurifierInstance ( $ configName = 'default' ) { $ _this = Purifier :: getInstance ( ) ; if ( ! isset ( $ _this -> _instances [ $ configName ] ) ) { if ( ! isset ( $ _this -> _configs [ $ configName ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Configuration and instance `%s` does not exist!' , $ configName ) ) ; } $ _this -> _instances [ $ configName ] = new \ HTMLPurifier ( $ _this -> _configs [ $ configName ] ) ; } return $ _this -> _instances [ $ configName ] ; }
Gets an instance of the purifier lib only when needed, lazy loading it

@param string $configName
@return HTMLPurifier
Gets an instance of the purifier lib only when needed lazy loading it