Modifications for module installer in openemr.
[openemr.git] / interface / modules / zend_modules / config / autoload / global.php
blobcd08392a0b7415df123b1777769515e7d1899c3a
1 <?php
2 /**
3 * Global Configuration Override
5 * You can use this file for overriding configuration values from modules, etc.
6 * You would place values in here that are agnostic to the environment and not
7 * sensitive to security.
9 * @NOTE: In practice, this file will typically be INCLUDED in your source
10 * control, so do not include passwords or other sensitive information in this
11 * file.
14 if ($GLOBALS['disable_utf8_flag']) {
15 $db = array(
16 'driver' => 'Pdo',
17 'dsn' => 'mysql:dbname='.$GLOBALS['dbase'].';host='.$GLOBALS['host'],
18 'username' => $GLOBALS['login'],
19 'password' => $GLOBALS['pass'],
20 'port' => $GLOBALS['port'],
22 } else {
23 $db = array(
24 'driver' => 'Pdo',
25 'dsn' => 'mysql:dbname='.$GLOBALS['dbase'].';host='.$GLOBALS['host'],
26 'username' => $GLOBALS['login'],
27 'password' => $GLOBALS['pass'],
28 'port' => $GLOBALS['port'],
29 'driver_options' => array(
30 PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
34 return array(
35 'db' => $db,
36 'service_manager' => array(
37 'factories' => array(
38 'Zend\Db\Adapter\Adapter' => function ($serviceManager) {
39 $adapterFactory = new Zend\Db\Adapter\AdapterServiceFactory();
40 $adapter = $adapterFactory->createService($serviceManager);
41 \Zend\Db\TableGateway\Feature\GlobalAdapterFeature::setStaticAdapter($adapter);
42 return $adapter;
44 ),