access models and forms within modules

Posted by sims on Stack Overflow See other posts from Stack Overflow or by sims
Published on 2010-04-26T09:21:45Z Indexed on 2010/04/27 0:13 UTC
Read the original article Hit count: 248

Filed under:

Hi Stackers,

What is the best way to access my models and forms from a controller of a module?

Let's explain with "pictures":

/application/module/storage/controllers/IndexController.php

needs to call readAction in the class called storage_Model_Files in

/application/module/storage/models/Files.php

I've made this app's dir structure and these forms and models with zf.sh (Zend_Tool).

I've read about all sorts of ways of manually including these files. I want to lazy load them much like everything is done automatically with the default module. I can't seem to find how in the docs.

Does that make sense?

I have:

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

in my application.ini file. So I can access my controllers fine.

Thanks for your help!

© Stack Overflow or respective owner

Related posts about zend-framework