Access to databases with Zend Framework 2 in the model

1

I wanted to ask about accessing databases using Zend Framework 2.

I am familiar with the use of ServiceManager and how the configuration is done in global.php , Module.php to access the database from the controller.

My current problem is: Is there any way to make this access without using the ServiceManager in the controller and send the Adapter as input argument to the model?

That is, can I "call" the adapter with the database access configuration from the models from which I am going to use to write SQL code directly?

    
asked by Javier Gonzalez Moncayo 06.04.2016 в 16:47
source

1 answer

-1

Visit this address may be useful for what you are asking.

    
answered by 13.04.2016 в 22:45