helios-ag / FMBbCodeBundle

:capital_abcd: BBCode bundle for Symfony projects
Other
57 stars 35 forks source link

problem recognizing decoda Class #1

Closed Kifah closed 12 years ago

Kifah commented 12 years ago

i get a fatal error when pasting some testcode into my base.twig.html {{'[b]Bold text[/b]'|BBCode}}

Fatal error: Class 'Decoda' not found in C:\Program Files (x86)\Zend\Apache2\htdocs\myproject\vendor\bundles\FM\BbCodeBundle\Twig\Extension\BbCodeHelperExtension.php on line 92

the class Decoda is inside the autoload.php and recognized well using my IDE (Zend Studio/Ecplise PDT).

Kifah commented 12 years ago

workaround was adding this on top of the file mentioned above

require_once DIR.'/../../../../../php-decoda/decoda/Decoda.php';

idetia commented 12 years ago

You must use registerPrefixes method to register the class:

$loader->registerPrefixes(array( ... 'Decoda' => DIR.'/../vendor/php-decoda/decoda', ));

Kifah commented 12 years ago

'Decoda' => DIR.'/../vendor/php-decoda/decoda', now it works fine. ok i did not have it under prefixes, only under registerNamespaces...maybe the documentation needs an update, can i do that myself?

idetia commented 12 years ago

No, the documentation is right. However you can propose whatever change to the author.

Kifah commented 12 years ago

ok thanks.