I have just started learning Zend Framework 2 as a long time Zend Framework 1 developer. I am having a little trouble wrapping my head around the new terminology.
Back in ZF1, if I wanted to create a logger that was global to an application I would add the configuration into the application.ini file and the bootstrap would initialize it as a resource (I hope I am saying that right). So then from any of my module controllers I could access the logger through bootstrap resources.
Enter ZF2, Modules are a bit different beast, they are self contained, but I am a bit confused about how they interact with the application. It seems to me like this is where the ServiceManager comes into play. My goal is, to have my Module (not the controller, but the module itself), to check if the Application has defined a logger and if it has, utilize that logger throughout the module. If the application does not define a logger, I want the module to define the logger for module wide logging.
This question also relates to databases as well, let's say I want to have the application define the logic of the database connection, while I want the module to define the logic of the tables it requires. How exactly do I configure this, and how/where can I tell if there is already a database resource defined in the Application.
Note: I have gone through Rob Allen's Quickstart (quite information and the only resource I have found that lacks obscurity thusfar), and the ZF2 (readthedocs), and googled tons already. What I am finding is that the information is generally very obscure when it comes to 'where' certain pieces of the puzzle go.