This suggestion works great in ZF 1.0.4, but since upgrading to 1.5.0 I can't get it to work. The errors I get are:
[Fri Mar 28 11:53:04 2008] [error] [client 127.0.0.1] PHP Warning: Zend_Loader::include_once(DOMPDF\\Exception.php) [ function.Zend-Loader-include-once function.Zend-Loader-include-once ]: failed to open stream: No such file or directory in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\ZendFramework\\library\\Zend\\Loader.php on line 83, referer: http://localhost/Magik/ [Fri Mar 28 11:53:04 2008] [error] [client 127.0.0.1] PHP Warning: Zend_Loader::include_once() [ function.include function.include ]: Failed opening 'DOMPDF\\Exception.php' for inclusion (include_path='widgets/Macro4/Accounting/RunReport\\;.;C:\\php5\\pear;..\\ZendFramework\\library;.\\library;.\\library\\DomPDF;.\\application\\models;.\\application\\config;.\\widgets') in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\ZendFramework\\library\\Zend\\Loader.php on line 83, referer: http://localhost/Magik/ etc. Anyone else having the same issue/problems or better still is there a solution :-) Ken Petri wrote: > > > Matthew Weier O'Phinney-3 wrote: >> >> I can't be certain, as I don't know the DOMPDF code, but you should be >> able to load it as an additional spl_autoload handler: >> >> require_once 'Zend/Loader.php'; >> require_once 'path/to/file/containing/DOMPDF_autoload...'; >> Zend_Loader::registerAutoload(); >> spl_autoload_register('DOMPDF_autoload'); >> >> spl_autoload() is an improvement over __autoload() precisely for >> situations like this, where you need to mix and match libraries that >> have their own autoloading logic, and is why we adopted it in ZF. >> >> -- >> Matthew Weier O'Phinney >> PHP Developer | [EMAIL PROTECTED] >> Zend - The PHP Company | http://www.zend.com/ >> >> > > Thank you, Matthew! This worked perfectly. I had the registerAutoload in > the bootstrap file, and the require_once was in place, so all I had to do > was add the spl_autoload_register(), et voila! > > Zend Framework is terrific. So is DOMPDF--might be a good model for > redesign of Zend_PDF for version 1.5. > > Again, thanks. Saved my bacon! > > ken > > -- View this message in context: http://www.nabble.com/loading-non-ZF-classes-using-autoloader-tp14705760p16349621.html Sent from the Zend Framework mailing list archive at Nabble.com.
