⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 decorator.php

📁 很棒的在线教学系统
💻 PHP
字号:
<?phprequire_once 'HTMLPurifier/DefinitionCache.php';class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache{        /**     * Cache object we are decorating     */    var $cache;        function HTMLPurifier_DefinitionCache_Decorator() {}        /**     * Lazy decorator function     * @param $cache Reference to cache object to decorate     */    function decorate(&$cache) {        $decorator = $this->copy();        // reference is necessary for mocks in PHP 4        $decorator->cache =& $cache;        $decorator->type  = $cache->type;        return $decorator;    }        /**     * Cross-compatible clone substitute     */    function copy() {        return new HTMLPurifier_DefinitionCache_Decorator();    }        function add($def, $config) {        return $this->cache->add($def, $config);    }        function set($def, $config) {        return $this->cache->set($def, $config);    }        function replace($def, $config) {        return $this->cache->replace($def, $config);    }        function get($config) {        return $this->cache->get($config);    }        function flush($config) {        return $this->cache->flush($config);    }        function cleanup($config) {        return $this->cache->cleanup($config);    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -