-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
44 lines (34 loc) · 1.37 KB
/
config.php
File metadata and controls
44 lines (34 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$appConf = \com\sgtinc\ApplicationConfig::getInstance();
$appConf->__set('environment','production');
$appConf->__set('title','Slim Skeleton');
$appConf->__set('uriRoot','/');
//TODO: Should the DB Connection Info be configurable on init and within admin?
$appConf->__set('dbHost','localhost');
$appConf->__set('dbPort','3306');
$appConf->__set('dbName','skeleton');
$appConf->__set('dbUsername','skeleton');
$appConf->__set('dbPassword','...');
//TODO: Make LDAP configurable in the application
$appConf->__set('ldapHost','ldap://localhost');
$appConf->__set('ldapPort','636');
//TODO: Make SMTP configurable in the application
$appConf->__set('smtpHost','localhost');
$appConf->__set('smtpPort','25');
$appConf->__set('smtpFromEmail','no-reply@sgt-inc.com');
$appConf->__set('smtpFromName','SGT Slim Skeleton');
switch($_SERVER['SERVER_NAME']) {
case "localhost":
case "127.0.0.1":
$appConf->__set('environment','local');
$appConf->__set('title',$appConf->__get('title').' - local');
$appConf->__set('uriRoot','/lites/slim-twig-skeleton/public/');
$appConf->__set('smtpHost','localhost');
$appConf->__set('smtpPort','8025');
break;
default:
break;
}
//Instantiate MySQL DB connection
$appConf->__set('dbConnString','mysql:host=' . $appConf->__get('dbHost') . ';port=' . $appConf->__get('dbPort') . ';dbname=' . $appConf->__get('dbName'));
$GLOBALS['appConf'] = $appConf;