Laravel和HTMLPurifier自动加载问题

I am having trouble setting up HTMLPurifier to work in Laravel. The following is my code

require_once 'C:\wamp\www\workbench\vendor/ezyang/htmlpurifier/library/HTMLPurifier.autoload.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.AllowedElements', 'strong,em,a[href],ul,ol,li,p,blockquote,h1,h2');
$config->set('HTML.AllowedAttributes', '');
$config->set('AutoFormat.RemoveEmpty', true);
$config->set('AutoFormat.AutoParagraph', false);
$purifier = new HTMLPurifier($config);

But when I run my application I receive the following:

Class 'Workbench\Dailies\Repositories\Stories\HTMLPurifier_Config' not found

Can anyone help me out with this?

The easiest way to install htmlpurifier is to use mewebstudio's purifier

For further references, try not to use absolute path in your require_once statements. When you will install it with composer ( mewebstudios purifier ), you won't need to reference the autoloader because composer will do it for you

To install, simply add it to your composer.json file :

{
    "require": {
        "laravel/framework": "4.0.*",
        "mews/purifier": "dev-master"
    },
    "minimum-stability": "dev"
}

To answer your question directly, HTMLPurifier_Config class is not found because it's trying to find it in your current namspace ( i.e. 'Workbench\Dailies\Repositories\Stories\HTMLPurifier_Config ) and not in it's namespace