2008年8月7日星期四

Re: [fw-db] Zend Row & Data Related Helper Methods

2008/8/6 SiCo007 <simon@sico.co.uk>:
> Thanks but I don't really understand! I can't access the model classes from
> the row of data can I? Or if so how? Still very confused!

Model class should be designed by you as a middle layer between:
- controllers and helpers
- database, rss feeds consumed, filesystem, svn repository, etc etc...
There's no interfaces or abstract classes in ZF for models, feel free
to build them as you need. Personally I have some classes like
Section, Article, User that has some rows and tables as private (or
protected) members, and queries db as requested by calling their
methods. Take a look at my code (still in development):
http://ossigeno.svn.sourceforge.net/viewvc/ossigeno/trunk/core/application/modules/content/models/
http://ossigeno.svn.sourceforge.net/viewvc/ossigeno/trunk/core/library/Otk/Model

--
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://www.sourceforge.net/projects/ossigeno

没有评论: