-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathconfig.sample.php
More file actions
78 lines (66 loc) · 2.87 KB
/
config.sample.php
File metadata and controls
78 lines (66 loc) · 2.87 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
use SiteMaster\Core\Config;
/**********************************************************************************************************************
* php related settings
*/
ini_set('display_errors', true);
error_reporting(E_ALL);
Config::set('URL', '/'); //Trailing slash is important
/**********************************************************************************************************************
* DB related settings
*/
Config::set('DB_HOST' , 'localhost');
Config::set('DB_USER' , 'sitemaster');
Config::set('DB_PASSWORD' , 'password');
Config::set('DB_NAME' , 'sitemaster');
/**********************************************************************************************************************
* Other settings, including theme
*/
Config::set('THEME', 'foundation');
/**********************************************************************************************************************
* Plugin related settings
*/
Config::set('PLUGINS', array(
'example' => array('setting'=>'value'),
'theme_foundation' => array('setting'=>'value'),
'auth_google' => array('setting'=>'value'),
));
/**********************************************************************************************************************
* group settings
*/
Config::set('GROUPS', [
//The key is the group's name (machine name). Each group config is its own array
'default' => [
//define custom metrics with with the 'METRICS' key, contents of this array match the 'PLUGINS' configuration option, but can only contain 'metric' plugins. Other plugins such as authentication or themes are applied to all groups.
'METRICS' => [
'example' => array(
'setting' => 'value',
),
],
//You can also set a few other settings on a group level
//'SITE_PASS_FAIL' => false,
//'SCAN_PAGE_LIMIT' => 5,
],
]);
/**********************************************************************************************************************
* unit test settings
*/
Config::set('TEST_DB_HOST' , 'localhost');
Config::set('TEST_DB_USER' , 'sitemaster_test');
Config::set('TEST_DB_PASSWORD' , 'password');
Config::set('TEST_DB_NAME' , 'sitemaster_test');
/**********************************************************************************************************************
* TRAVIS settings
*/
if (getenv('TRAVIS')) {
//
Config::set('DB_HOST' , '127.0.0.1');
Config::set('DB_USER' , 'travis');
Config::set('DB_PASSWORD' , '');
Config::set('DB_NAME' , 'sitemaster_test');
//Set the config to match the production config for travis CI
Config::set('TEST_DB_HOST' , Config::get('DB_HOST'));
Config::set('TEST_DB_USER' , Config::get('DB_USER'));
Config::set('TEST_DB_PASSWORD' , Config::get('DB_PASSWORD'));
Config::set('TEST_DB_NAME' , Config::get('DB_NAME'));
}