Include HTMLpurifier with Zend_Loader

前端 未结 4 2173
醉梦人生
醉梦人生 2021-02-06 17:58

I want to use the HTMLpurifier in combination with the Zend Framework. I would love to load the Class and its files with the Zend_Loader. How would you include it? Would you jus

4条回答
  •  我寻月下人不归
    2021-02-06 18:24

    Unless I'm misunderstanding the question (Or HTMLpurifier). If you have Zend_Loader running and it's set to autoload.

    require_once('Zend/Loader.php');
    Zend_Loader::registerAutoload();
    

    Or something to that effect. Put the HTMLpurifier class in your library directory. I'm just not sure on it's actual class name.

    You can just put the class file in the library directory and call it by it's name, or maybe toss it in a misc package.

    Examples

    // SITE/library/Zend/Auth.php
    class Zend_Auth
    {
    }
    
    // SITE/library/htmlpurifier.php
    class htmlpurifier
    {
    }
    
    // SITE/library/misc/htmlpurifier.php
    class Misc_HTMLpurifier
    {
    }
    

    Make sense?

提交回复
热议问题