New autoloading with Zend Framework 1.8

I love the fact that you can autoload classes using the ZF. I was a little shocked at the depreciation errors when I updated to ZF 1.8. Apparently, there is a new way to use the autoload class. It took a little reading but I came up with this solution. Let me know what you think!

/*
 * Set up Zend loader
 */
require_once 'Zend/Loader/Autoloader.php';

$autoloader = Zend_Loader_Autoloader::getInstance();

/*
 * Register Cisc Classes
 */
$autoloader->registerNamespace('Cisc_');

The registerNamespace function registers my own classes.

Advertisements

2 thoughts on “New autoloading with Zend Framework 1.8

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s