No worries Mike. It's just something new to learn. I am having another problem though.
I've removed my /models directory from the include path and attempted to use: $modelLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'Model', 'basePath' => APPLICATION_PATH . '/models', )); I added the namespace "Model" to a class name inside the /models directory, but no luck. *"Fatal error*: Class 'Model_HitsTb' not found in...." Could the initDefaultResourceTypes() call in the Zend_Application_Module_Autoloader overwrite what I passed to it? I think it tries to set up a Model namespace by default in the /models directory. This is basically exactly what I'd like to do. Thanks, J Jason DEBORD Limoges, France http://www.jasondebord.net/ On Sat, May 2, 2009 at 9:48 PM, Mike Wright <mike.wri...@mailinator.com>wrote: > Mike Wright wrote: > >> J DeBord wrote: >> >>> My code: >>> >>> require_once 'Zend/Loader/Autoloader.php'; >>> $autoloader = Zend_Loader_Autoloader::getInstance(); >>> $autoloader->registerNamespace(array('Amazon_', 'Nba_')); >>> >>> $filesDomain = new Nba_SimpleDb_Domain_Files; >>> >>> There is a parse error in the class Nba_SimpleDb_Domain_Files. >>> With the code above, when executed, the screen is blank. >>> >>> >> Rank amateur wrt ZF but I'll give this a stab. >> >> According to the API "registerNamespace" takes a simple string, not an >> array. I'm guessing that you'd have to call that method twice, once for >> each namespace you wish to register. >> >> > Follow up: > > I was looking at Matthew's example on devzone and saw that he passed > registerNamespace an array so I waddled through the source. > > Turns out it checks if the method has been passed a string and, if so, > recasts it into an array. If it is not a string it checks to see if it > is an array. If it is not an array an exception is thrown. > > So line 200 in Zend/Loader/Autoloader.php should be changed from > > * @param string $namespace > to > * @param string|array $namespace > > Sorry for my original bad advice :( > > > >