Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
coogle committed Jan 27, 2014
1 parent 7e3dc90 commit c4cf69d
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
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')
)
)
);
```


0 comments on commit c4cf69d

Please sign in to comment.