On Fri, May 1, 2009 at 11:52 AM, mvug <[email protected]> wrote:
>
> Hi guys,
>
> I use the Zend framework for generating PDF's... I use the following code
> to
> initialize zend_pdf, but from version 1.8 the autoloader is not working...
> can anybody help me? This is the "old" code I use...
>
> <?php
>
> // LOAD ZEND_PDF
> $path = '../system/plugins';
> set_include_path( get_include_path().PATH_SEPARATOR.$path );
> require_once $path.'/Zend/Loader.php';
> Zend_Loader::registerAutoload();
>
> $pdf = Zend_Pdf::load('templatepdf.pdf');
> ?>
> --
Don't know if this is directly relevant to your problem, but when I ran
similar code in 1.8.0 I got deprecation warnings. Now I go like this in my
bootstrap (rather, my index.php; migration to real bootstrapping is a WIP):
require_once('Zend/Loader/Autoloader.php');
Zend_Loader_Autoloader::getInstance();
and that seems to be enough because "the first time an instance of the
autoloader is retrieved, it registers itself with spl_autoload. You retrieve
an instance using the getInstance() method" according to
http://framework.zend.com/manual/en/zend.loader.autoloader.html#zend.loader.autoloader.usage
.
There is surely a more correct way in 1.8.
--
David Mintz
http://davidmintz.org/
The subtle source is clear and bright
The tributary streams flow through the darkness