3
votes

How to autoload Symfony classes in the app based on Zend Framework? Can I push some kind of Symfony autoloader to the Zend's Autoloader?

I need to use some of the components like output escaper or dependency injection classes.

1
This look like what you are searching for : losohome.wordpress.com/2010/01/22/…greg0ire
@greg0ire Not exactly. I'm looking for autoloader for all Symfony classes, not dependency injection solution.takeshin
I don't think thats possible. The sf autoloader depends on many sf project specific things like the cached autoloading-php files. You can take a look at the autoloader documentation (symfony-project.org/api/1_4/sfSimpleAutoload) but I don't think it will help you any furtherTimo Haberkern
@ArneRie Thanks, but I'm looking for exactly the opposite approach :)takeshin

1 Answers

1
votes

Zend's autoloader can accept multiple autoloaders:

$autoloader->pushAutoloader(array('ezcBase', 'autoload'), 'ezc');

The above is straight from the manual and shows how to include the autoloader of ezComponents (now Zeta Components) as an additional loader. You can try to go this route by providing Sfs Autoloader.