Zend Framework database initialisation?

So my natural conclusion to this is that the database object is automatically generated from the parameters provided in the application. Ini config file? Kind of, in fact, there are a few step before your database get initialized Your application is bootstraped It reads the config file When a resource.

* is found, check if the according resource class exists The resource class initialize an object with the given parameter Zend_Db_Table has a static method setDefaultAdapter($db) which takes the newly created Zend_Db object, now every Zend_Db_table object can use the Db object you set in your configuration Return the newly created object Go back to 3 Router, Controller, Layout, View, etc This "behavior" is recent, it's why you may found some old tutorial which shows you how to bootstrap your Zend_Db object manually, sometimes, it's just to show you how Zend_Db works.

So my natural conclusion to this is that the database object is automatically generated from the parameters provided in the application. Ini config file? Kind of, in fact, there are a few step before your database get initialized.

Your application is bootstraped It reads the config file When a resource. * is found, check if the according resource class exists The resource class initialize an object with the given parameter Zend_Db_Table has a static method setDefaultAdapter($db) which takes the newly created Zend_Db object, now every Zend_Db_table object can use the Db object you set in your configuration. Return the newly created object Go back to 3.

Router, Controller, Layout, View, etc. This "behavior" is recent, it's why you may found some old tutorial which shows you how to bootstrap your Zend_Db object manually, sometimes, it's just to show you how Zend_Db works.

Ah right, so im assuming that anything under resource. Db, relates to an instance of the zend_db class? – richzilla Apr 6 at 22:45 1 yup!

If you check in the Zend/Application/Resource folder you'll see all the resource classes that come with Zend. When you see resources. * it'll go to this folder and look for the corresponding resource class and feed it the parameters it got from the .

Ini file. The class uses these to then create the actual object you'll use later. – Jerry Saravia Apr 7 at 7:09.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions