views:

39

answers:

1

Hi,

I have one doubt in zend framework. I need all model details from project which i have done in zend framework. Is there any possibility to get all model details in zend framework.

Please help me..

Thanks and regards, Prasanth P

A: 

If by Model you mean you want to get the details about a DB Table, then yes. You can get this data by calling the following method from Zend_Db_Table

  • info() - Returns table information.

There is no method to say getAllDbTables. If you need this, you could write a custom Db Repository that knows all Db Tables and that can give you table instances and any info information you need about. This would have the additional benefit of decoupling concrete table instances from your using classes.

Keep in mind though that the M in MVC is not just the database. The M is the heart of your application. It contains application logic, domain objects, service layers, etc. The persistence layer is just one part of it.

Gordon
But i need to get all Models in a project.. I need to create a search function using that. if i search one key we need to searchg in all table and list all the datas..
Prasanth P