Le 31/01/2011 21:02, Adrien Mogenet a écrit :
Hi everyone,

I'm still learning Symfony2...
I added "GeSHI" as a library in src/vendor/geshi.
I renamed the GeSHI class to "GeSHI_Displayer", as described in
documentation PEAR naming usage (http://docs.symfony-reloaded.org/
guides/tools/autoloader.html#usage)
I declared this library into the autoload.php (registerPrefixes :
GeSHI_ =>  $vendor/geshi)

But, when I try to instantiate a new object from a controller...

$geshi = new GeSHI_Displayer($code, $language);
I got the Class Not Found exception. Did I miss something with the
autoloader ?

The GeSHI_Displayer class has to be defined in GeSHI/Displayer.php to follow the PEAR naming convention. This is the way the autoloader finds the good file.

--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to