Search code examples
phpzend-frameworkpropel

Zend autoload is not working


I have been integrating application using zend and I am trying to use propel as a model.So I have just included propel run time libraries in my page.But When I include that third party libraries inside my zend it provides errors like "Class 'Zend_Controller_Router_Rewrite'" not found.The class files are not included while we include propel libraries.any one can suggest.Thanks in advance


Solution

  • I had a similar issue (although not using Zend) and I had to disable the Propel autoloader and implement my own. Perhaps if you were to disable the Propel autoloader and add the generated Propel model directories to your include path you would be set?

    set_include_path(get_include_path().PATH_SEPARATOR."/path/to/Propel/models");
    Propel::init("/path/to/propel_conf.php");
    PropelAutoloader::unregister();
    

    You may need to add the include_path configuration somewhere else for Zend to use it - sorry, but I'm not familiar with that side of things.