by simon baird

Thursday, August 07, 2008

Setting up Zend to autoload eZ Components classes

In this article, Ralf Eggert describes how to make Zend autoload ezComponents classes by defining an __autoload method. I'm doing it another way (see below).  It seems to work just as well and it's shorter and cleaner:
require_once "Zend/Loader.php";
require_once "ezc/Base/src/base.php";

Zend_Loader::registerAutoload('Zend_Loader');
Zend_Loader::registerAutoload('ezcBase');

Disclaimer: I'm a beginner at all this stuff...

1 comment:

Anonymous said...

What about plain simple spl_autoload_register()?