> Hi,
>
> I noticed that new auto loading activates only when you add module bootstrap
> files.
.., and you are using Zend_Application [1] and have the
Module-Resource-Plugin [2] registered. If you are using
'Zend_Application' you just need to add an empty config-section
'resource.modules' to you configuration.
INI:
resources.modules =
XML
<config><section><resources>
<modules />
</resources></section></config>
If you are not using 'Zend_Application' you can instantiate the
'Zend_Application_Module_Autoloader', which extends
'Zend_Loader_Autoloader_Resource' and has some predefined resources in
it, and use it with 'Zend_Loader_Autoloader'.
> Empty extended class seems to be enough to get autoloading going
> (application/modules/mymodule/Bootstrap.php).
>
> class Mymodule_Bootstrap extends Zend_Application_Module_Bootstrap
> {
>
> }
>
> br, Marko
>
>
> iceangel89 wrote:
>> how/do i need to include the models folder in my include path to use
>> models?
>>
>> i thought ZendFramework is MVC so how come models are not
>> included/detected automatically?
>>
>> i am using ZF1.8 and my directory structure is
>>
>> /application
>> /modules
>> /mod1
>> /models
>> /views
>> /controllers
>> /mod2
>> /models
>> /views
>> /controllers
>> /mod3
>> /models
>> /views
>> /controllers
>>
>> i am using application.ini also . generated by Zend_Tool
[1] http://framework.zend.com/manual/en/zend.application.html
[2]
http://framework.zend.com/manual/en/zend.application.available-resources.html#zend.application.available-resources.modules
--
Sebastian Krebs
http://www.kingcrunch2000.de
PGP public key for encryption
http://kingcrunch2000.de/public/0x44291B2B-pub.asc
没有评论:
发表评论