3

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.

takeshin
  • 49,108
  • 32
  • 120
  • 164
  • This look like what you are searching for : http://losohome.wordpress.com/2010/01/22/integrating-symfony-dependency-injection-service-container-with-zend-framework/ – greg0ire Sep 04 '10 at 22:21
  • @greg0ire Not exactly. I'm looking for autoloader for all Symfony classes, not dependency injection solution. – takeshin Sep 05 '10 at 12:40
  • 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 (http://www.symfony-project.org/api/1_4/sfSimpleAutoload) but I don't think it will help you any further – Timo Haberkern Sep 05 '10 at 19:01
  • Check this link: http://www.slideshare.net/weierophinney/using-zend-framework-with-symfony – opHASnoNAME Sep 06 '10 at 18:58
  • @ArneRie Thanks, but I'm looking for exactly the opposite approach :) – takeshin Sep 06 '10 at 19:47

1 Answers1

1

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.

Gordon
  • 312,688
  • 75
  • 539
  • 559