Proyectos de Subversion LeadersLinked - Services

Rev

Rev 301 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 301 Rev 746
Línea 9... Línea 9...
9
 *
9
 *
10
 * NOTE: In practice, this file will typically be INCLUDED in your source
10
 * NOTE: In practice, this file will typically be INCLUDED in your source
11
 * control, so do not include passwords or other sensitive information in this
11
 * control, so do not include passwords or other sensitive information in this
12
 * file.
12
 * file.
13
 */
13
 */
-
 
14
use Laminas\Db\Adapter\Adapter;
-
 
15
use Laminas\Log\Formatter\Base;
-
 
16
use Laminas\Log\Logger;
-
 
17
use Laminas\Log\Writer\Db;
14
use Laminas\Session\Storage\SessionArrayStorage;
18
use Laminas\Session\Storage\SessionArrayStorage;
15
use Laminas\Session\Validator\RemoteAddr;
19
use Laminas\Session\Validator\RemoteAddr;
16
use Laminas\Session\Validator\HttpUserAgent;
20
use Laminas\Session\Validator\HttpUserAgent;
17
use LeadersLinked\Handler\SessionHandler;
21
use LeadersLinked\Handler\SessionHandler;
18
use Laminas\Session\Storage\SessionStorage;
22
use Laminas\Session\Storage\SessionStorage;
Línea 70... Línea 74...
70
                    $dbname     = $config['leaderslinked.database.production_dbname'];
74
                    $dbname     = $config['leaderslinked.database.production_dbname'];
71
                    $user       = $config['leaderslinked.database.production_user'];
75
                    $user       = $config['leaderslinked.database.production_user'];
72
                    $password   = $config['leaderslinked.database.production_password'];
76
                    $password   = $config['leaderslinked.database.production_password'];
73
                }
77
                }
Línea 74... Línea 78...
74
                
78
                
75
                $adapter = new \Laminas\Db\Adapter\Adapter([
79
                $adapter = new Adapter([
76
                    'driver'            => 'Pdo',
80
                    'driver'            => 'Pdo',
77
                    'dsn'               => 'mysql:dbname=' . $dbname . ';host=' . $host . ';port=' . $port,
81
                    'dsn'               => 'mysql:dbname=' . $dbname . ';host=' . $host . ';port=' . $port,
78
                    'username'                  => $user,
82
                    'username'                  => $user,
79
                    'password'                  => $password,
83
                    'password'                  => $password,
Línea 84... Línea 88...
84
            
88
            
Línea 85... Línea 89...
85
            return $adapter;
89
            return $adapter;
86
            
90
            
87
            },
91
            },
88
            'leaders-linked-log' => function($sm) {
92
            'leaders-linked-log' => function($sm) {
Línea 89... Línea 93...
89
                $formatter = new \Laminas\Log\Formatter\Base();
93
                $formatter = new Base();
90
                $formatter->setDateTimeFormat('Y-m-d H:i:s');
94
                $formatter->setDateTimeFormat('Y-m-d H:i:s');
91
                
95
                
Línea 101... Línea 105...
101
                );
105
                );
Línea 102... Línea 106...
102
            
106
            
Línea 103... Línea 107...
103
            
107
            
104
                $adapter = $sm->get('leaders-linked-db');
108
                $adapter = $sm->get('leaders-linked-db');
Línea 105... Línea 109...
105
                
109
                
106
                $writer = new \Laminas\Log\Writer\Db($adapter, 'tbl_logs', $mapping);
110
                $writer = new Db($adapter, 'tbl_logs', $mapping);
Línea 107... Línea 111...
107
                $writer->setFormatter($formatter);
111
                $writer->setFormatter($formatter);