Autoloading forms and models for each module in Zend?

The module bootstrap class sets up the module autoloader automatically, so you can remove your example _initAutoload() function leaving just an empty class and it should all just work. See: framework.zend.com/manual/en/zend.loader....

The module bootstrap class sets up the module autoloader automatically, so you can remove your example _initAutoload() function leaving just an empty class and it should all just work. See: framework.zend.com/manual/en/zend.loader... Edit: It sounds like your module bootstraps aren't being run. This is not an uncommon problem as the way it all fits together can be a bit confusing.

The quickest way to verify this would be to just add an init method to one of them with an echo and an exit and see if it ever gets output. Module bootstraps are pulled in and run by the 'modules' resource within Zend Application. You need to trigger this resource in some way because ZF won't go hunting around for module bootstraps just in case they are there.

The most common way to do this is to include this line in your application. Ini: resources. Modules = "" alternatively you can manually setup the resource from your main Bootstrap file.

I'm following the correct structure, yet it doesn't work. It only works for application/models* (so not in modules) when using the setting provided by @Tjorriemorrie's answer. – lefke123 Apr 10 at 8:07 You must be doing something else incorrectly because this is in fact the correct method to achieve this.

– John Cartwright Apr 10 at 19:44 Could you give an example of your class names? E.g. The account model in your example above should be named Foo_Model_Account - does this match what you have?

– Tim Fountain Apr 11 at 0:37 @John Cartwright That's what I figure, but for now, everything is confirm with the naming conventions. Tried out all answers / comments. Yet no avail.

@Tim Fountain Yes, this matches it exactly (first thing I double-checked were the conventions). I'll edit my question to reflect the comments. – lefke123 Apr 11 at 21:08 1 Shouldn't be any issues keeping the main bootstrap in.

I've created a barebones app using your structure which includes working module autoloading and a main bootstrap. You can grab this here tim.incutio. Com/moduleautoloadtest.

Zip (just drop ZF into the library folder to make it work). Hopefully this will give you some clues. – Tim Fountain Apr 12 at 8:36.

I also had it always like that. But since the release of 1.10 (wild guess), you can remove that bootstrap code and just put the following line in your application. Ini: appnamespace = "Foo" I personally leave mine empty.

This makes it work for global application/models* for me, but it doesn't load any module-specific models. – lefke123 Apr 10 at 8:12 @lefke123 OK, add resources.frontController. ModuleDirectory = APPLICATION "/modules" and resources.

Module = "" – Tjorriemorrie Apr 11 at 10:51 I already had those lines, that's why it's so odd this problem is so persistent. Thanks anyway! – lefke123 Apr 11 at 17:47.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions