I am building a Symfony project, and have created a new plug-in named sfUtilsPlugin. I currently have a directory structure that looks like this:
sfUtilsPlugin/ modules/ sfSearchLucene/ actions/ config/ lib/ templates/
Now, in the sfUtilsPlugin/modules/sfSearchLucene/lib directory, I have an object called sfLucene. The idea was that this object is accessible from the Symfony auto loading mechanism, so that it can be instantiated from anywhere within the application.
However, simply adding the sfLucene.class.php file to the sfUtilsPlugin/modules/sfSearchLucene/lib directory does not appear to add it to the autoloader.
Does anyone out there know why this might be happening? Perhaps it is just not possible to automatically use objects stored in this location inside Symfony.
Any advice is appreciated.
Because you are adding this class in
libsubdirectory of modulesfLucene, it will be autoloaded only if current module issfLucene.You have two options:
sfUtilsPlugin/libdirectory;requirethem every time you need it