Artsemis wrote: > > So, why is it that Zend_Application_Module_Autoloader [b]specifically[/b] > checks for DbTable classes in the /models/DbTable/ class? Unless I'm > missing something, this specific check is redundant as the underscore in > the class name indicates that "DbTable" is a subdirectory of /models/ > anyways so it's not necessary to specifically check it. >
Because the module autoloader follows the format of a plugin loader - which youve probably noticed doesnt follow the the same mapping convention but rather allows you to arbitrarily map namespaces to file system locations. Im assuming this is to add flexibility because you might not always want plugins to rely on the hard class name -> path mapping. Im sure there are a number of uses cases for this. However i think it would be mighty handy to have an option to say "useAsBase" or something and then form the the specified mapping down if follows standard Zend/Pear conventions... This makes it a lot easier to keep things organized. For example if youre doing Rowset/Row classes as well as Tables its a lot nicer to have the traditional package structure: models/DbTable /Row /Rowset currently if you want that i believe you have to add namespaces explicity to the module autoloader/plugin loader. Unless im missing something somewhere... This cant be an uncommon use case either... -- View this message in context: http://old.nabble.com/Why-does-Zend_Application_Module_Autoloader-specifically-look-in--models-dbTable---tp26160188p26160198.html Sent from the Zend Framework mailing list archive at Nabble.com.