-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,37 @@ | ||
ZF2 Logger Module | ||
ZF2 MultiDatabase Module | ||
=========================== | ||
|
||
Introduction | ||
------------ | ||
This is a relatively simple Logger Module for ZF2. It attaches to the 'log' event allowing it to capture logging events from any module that triggers that event. | ||
This simple module allows you to define multiple database connections easily in ZF2 projects. | ||
|
||
Usage | ||
----- | ||
Usage is very straightforward, simply add configuration keys as shown: | ||
|
||
``` | ||
array( | ||
'db-portal' => array( | ||
'driver' => 'Pdo', | ||
'dsn' => 'mysql:dbname=portal;host=localhost', | ||
'driver_options' => array( | ||
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES\'UTF8\'' | ||
) | ||
), | ||
'db-radius' => array( | ||
'driver' => 'Pdo', | ||
'dsn' => 'mysql:dbname=radius;host=localhost', | ||
'driver_options' => array( | ||
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES\'UTF8\'' | ||
) | ||
), | ||
'service_manager' => array( | ||
'factories' => array( | ||
'Zend\Db\Adapter\Adapter' => new AdapterServiceFactory('db-portal'), | ||
'Radius-Db' => new AdapterServiceFactory('db-radius') | ||
) | ||
) | ||
); | ||
``` | ||
|
||
|