View Single Post
  #1 (permalink)  
Old 04-14-2008, 10:39 PM
Mark^Bastard Mark^Bastard is offline
Junior Member
 
Join Date: May 2007
Posts: 15
Default Autoloading Models

I'm interested to find out how everyone else is loading / naming their model classes?

There's a distinct lack of 'magic' in the framework for handling this. It seems you have to do one of the following.

1 - Add your model directory(s) to the include path.
2 - include/require your model class before using it.

I'm using register autoload in my app so really want to avoid having to manually include model class files, but I also don't really like having to add my model directories to the include path, because I'm using modules and have many model directories.

I'm almost tempted to just put them all in the library folder.

I've considered writing my own loader class and registering it with Zend_Load but surely there's a better way?
Reply With Quote