[tags]Zend, Zend Search Lucene, Search, Lucene, php, symfony, zsl, plugins[/tags]
I originally intended to rewrite my Zend Search Lucene tutorial, but Peter Van Garderen covered the bulk of what's changed and I was too busy developing search functionality for lyro.com (not to mention finding inconsistencies with the Zend Search Lucene port and Lucene) to finish the tutorial. So I broke it up into smaller pieces.
I packaged Zend Framework into a symfony plugin. symfony is easily extended using plugins.
You can obtain this from subversion with the following command (from your /plugins directory):
svn export http://svn.symfony-project.com/plugins/sfZendPlugin
symfony has a Zend Framework Bridge which let's us autoload the framework by adding the following to settings.yml:
.settings:
zend_lib_dir: %SF_ROOT_DIR%/plugins/sfZendPlugin/lib
autoloading_functions:
- [sfZendFrameworkBridge, autoload]
First we define sf_zend_lib_dir to be in our plugin's lib directory. Then we autoload the bridge framework.
After setting this up, all the Zend classes will be available and auto-loaded from elsewhere in your code.



I wasn’t sure what the sfZendPlugin did, but now I understand. It’s the Zend library itself. Perhaps you could add some explanation to the wiki ( http://trac.symfony-project.com/trac/wiki/SymfonyPlugins ).
You bet!
That was fast
If I didn’t do it now, it’d never get done
What are the performance overheads of merging the zend framework into symfony? Am I understanding this correctly, you are in effect merging the two frameworks into one? or rather just making the classes available on demand?
Dystopia,
This just makese the classes available on demand. It’s really just providing the library, and documentation on how to use the bridge that’s part of symfony.
I think the intent of both frameworks is too different to be merged, but Zend lends itself to being easily compartmentalized. For example it’s very simple to integrate the Zend Search Lucene into a symfony app.
FYI: if you’re using symfony 1.0.5 you will need to read this ticket on the symfony site and apply the fix: http://trac.symfony-project.com/trac/ticket/1941
Jesse.