> how/do i need to include the models folder in my include path to use models?
First of all you can load them directly via require_once
> i thought ZendFramework is MVC so how come models are not included/detected
> automatically?
With Zend_Loader this it not possible. The components below the modules
usually dont follow the code conventions [1] used in the library. In 1.8
there is a new Autoloader-component 'Zend_Autoloader' [2] in which you
can add own autoloading-classes, or you simply use the predefined
resource-autoloader. [3]
There are examples. Have a look at it and try it out ;)
> 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/coding-standard.html
[2] http://framework.zend.com/manual/en/zend.loader.autoloader.html
[3] http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html
--
Sebastian Krebs
http://www.kingcrunch2000.de
PGP public key for encryption
http://kingcrunch2000.de/public/0x44291B2B-pub.asc
没有评论:
发表评论