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?