public function initPurifier($defaultPurifierSerializerCache = null)
    {
        if (null !== $this->purifierConfig) {
            $HTMLPurifierConfig  = $this->purifierConfig;
        } else {
            $HTMLPurifierConfig = \HTMLPurifier_Config::createDefault();
        }

        // Cache.SerializerPath defaults to Null and sets
        // the location to inside the vendor HTMLPurifier library
        // under the DefinitionCache/Serializer folder.
        if (!is_null($defaultPurifierSerializerCache)) {
            $HTMLPurifierConfig->set('Cache.SerializerPath', $defaultPurifierSerializerCache);
        }

        // Cache.SerializerPermissions defaults to 0744.
        // This setting allows the cache files to be deleted by any user, as they are typically
        // created by the web/php user (www-user, php-fpm, etc.)
        $HTMLPurifierConfig->set('Cache.SerializerPermissions', 0777);

        $this->purifier = new \HTMLPurifier($HTMLPurifierConfig);
    }
public function initPurifier($defaultPurifierSerializerCache = null)
    {
        if (null !== $this->purifierConfig) {
            $HTMLPurifierConfig  = $this->purifierConfig;
        } else {
            $HTMLPurifierConfig = \HTMLPurifier_Config::createDefault();
        }

        // Cache.SerializerPath defaults to Null and sets
        // the location to inside the vendor HTMLPurifier library
        // under the DefinitionCache/Serializer folder.
        if (!is_null($defaultPurifierSerializerCache)) {
            $HTMLPurifierConfig->set('Cache.SerializerPath', $defaultPurifierSerializerCache);
        }

        // Cache.SerializerPermissions defaults to 0744.
        // This setting allows the cache files to be deleted by any user, as they are typically
        // created by the web/php user (www-user, php-fpm, etc.)
        $HTMLPurifierConfig->set('Cache.SerializerPermissions', 0777);

        $this->purifier = new \HTMLPurifier($HTMLPurifierConfig);
    }
public function initPurifier ( $ defaultPurifierSerializerCache = null ) { if ( null !== $ this -> purifierConfig ) { $ HTMLPurifierConfig = $ this -> purifierConfig ; } else { $ HTMLPurifierConfig = \ HTMLPurifier_Config :: createDefault ( ) ; } // Cache.SerializerPath defaults to Null and sets // the location to inside the vendor HTMLPurifier library // under the DefinitionCache/Serializer folder. if ( ! is_null ( $ defaultPurifierSerializerCache ) ) { $ HTMLPurifierConfig -> set ( 'Cache.SerializerPath' , $ defaultPurifierSerializerCache ) ; } // Cache.SerializerPermissions defaults to 0744. // This setting allows the cache files to be deleted by any user, as they are typically // created by the web/php user (www-user, php-fpm, etc.) $ HTMLPurifierConfig -> set ( 'Cache.SerializerPermissions' , 0777 ) ; $ this -> purifier = new \ HTMLPurifier ( $ HTMLPurifierConfig ) ; }
Initializes HTMLPurifier with cache location.

@param null|string $defaultPurifierSerializerCache
Initializes HTMLPurifier with cache location .