Skip to content

Commit

Permalink
Merge remote-tracking branch 'adamlundrigan/hotfix/GH-28'
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed Mar 30, 2012
2 parents 2682a10 + 71193ce commit 2e65b5c
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ Coming soon...

<?php
// ./config/autoload/database.config.php

$mdb = array(
'dbname' => 'CHANGEME',
'user' => 'CHANGEME',
'pass' => 'CHANGEME',
'host' => 'CHANGEME',
);

/**
* No need to edit below this line
*/
return array(
'di' => array(
'instance' => array(
Expand All @@ -80,18 +91,33 @@ Coming soon...
),
'masterdb' => array(
'parameters' => array(
'dsn' => 'mysql:dbname=CHANGEME;host=CHANGEME',
'username' => 'CHANGEME',
'passwd' => 'CHANGEME',
'dsn' => "mysql:dbname={$mdb['dbname']};host={$mdb['host']}",
'username' => $mdb['user'],
'passwd' => $mdb['pass'],
'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''),
),
),
'Zend\Db\Adapter\Adapter' => array(
'parameters' => array(
'driver' => 'Zend\Db\Adapter\Driver\Pdo\Pdo',
),
),
'Zend\Db\Adapter\Driver\Pdo\Pdo' => array(
'parameters' => array(
'connection' => 'Zend\Db\Adapter\Driver\Pdo\Connection',
),
),
'Zend\Db\Adapter\Driver\Pdo\Connection' => array(
'parameters' => array(
'connectionInfo' => 'masterdb',
),
),
),
),
);

2. Now, specify the DI alias for your PDO connection in
`./configs/autoload/module.zfcuser.config.php`, under the 'pdo' setting.
`./configs/autoload/module.zfcuser.config.php`, under the 'zend_db_adapter' setting.
If you created the `./config/autoload/database.config.php` file in the
previous step, the alias you'll specify is 'masterdb'.

Expand Down

0 comments on commit 2e65b5c

Please sign in to comment.