forked from ifacesoft/ice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ice.conf.php
135 lines (133 loc) · 4.64 KB
/
Ice.conf.php
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
/**
* @file Ice module config
*
* Sets default config params for ice application components
*
* @author dp <[email protected]>
* @since -0
*/
if (!defined('OBJECT_CACHE')) {
define('OBJECT_CACHE', function_exists('apc_store') ? 'Apc' : 'Registry');
}
if (!defined('STRING_CACHE')) {
define('STRING_CACHE', class_exists('Redis', false) ? 'Redis' : 'File');
}
return [
'defaultLayoutView' => null,
'defaultLayoutAction' => 'Ice:Layout_Main',
'defaultViewRenderClass' => 'Ice:Php',
'modules' => [
'Ice' => __DIR__ . '/',
],
'configs' => [
'ice\core\Model' => [
'Ice' => 'ice\model\ice\\'
],
'ice\core\Action' => [
'Ice' => 'ice\action\\',
],
'ice\core\Validator' => [
'Ice' => 'ice\validator\\'
],
'ice\core\Query_Translator' => [
'Ice' => 'ice\query\translator\\'
],
'ice\core\View_Render' => [
'Ice' => 'ice\view\render\\'
]
],
'host' => '',
'hosts' => [
'/localhost/' => 'development',
'/.*/' => 'production'
],
'environment' => [],
'environments' => [
'production' => [
'debug' => false,
'dataProviderKeys' => [
'ice\core\Data_Source' => 'Mysqli:default/mysql',
'ice\core\Loader' => OBJECT_CACHE . ':storage/loader',
'ice\core\Action' => [
'instance' => OBJECT_CACHE . ':storage/action',
'output' => STRING_CACHE . ':cache/action'
],
'ice\core\Route' => OBJECT_CACHE . ':storage/router',
'ice\core\Config' => OBJECT_CACHE . ':storage/config',
'ice\core\View_Render' => OBJECT_CACHE . ':storage/view_render',
'ice\core\Query_Translator' => OBJECT_CACHE . ':storage/query_translator',
'ice\core\Query' => [
'sql' => STRING_CACHE . ':cache/sql',
'query' => STRING_CACHE . ':cache/query',
],
'ice\core\Model_Mapping' => OBJECT_CACHE . ':storage/model_mapping',
'ice\core\Data_Mapping' => OBJECT_CACHE . ':storage/data_mapping',
'ice\core\Model_Scheme' => OBJECT_CACHE . ':storage/model_scheme',
'ice\core\Validator' => OBJECT_CACHE . ':storage/validator',
'ice\core\Cache' => STRING_CACHE . ':cache/tags',
'ice\core\View' => STRING_CACHE . ':cache/view',
],
],
'test' => [
'debug' => true,
],
'development' => [
'dataProviderKeys' => [
'ice\core\Loader' => 'Registry:storage/loader',
'ice\core\Action' => [
'instance' => 'Registry:storage/action',
'output' => 'Null:cache/action'
],
'ice\core\Route' => 'Registry:storage/router',
'ice\core\Config' => 'Registry:storage/config',
'ice\core\View_Render' => 'Registry:storage/view_render',
'ice\core\Query_Translator' => 'Registry:storage/query_translator',
'ice\core\Query' => [
'sql' => 'Null:cache/sql',
'query' => 'Null:cache/query',
],
'ice\core\Model_Mapping' => 'Registry:storage/model_mapping',
'ice\core\Data_Mapping' => 'Registry:storage/data_mapping',
'ice\core\Model_Scheme' => 'Registry:storage/model_scheme',
'ice\core\Validator' => 'Registry:storage/validator',
'ice\core\Cache' => 'Null:cache/tags',
'ice\core\View' => 'Null:cache/view',
],
]
],
'viewRenders' => [
'Php' => []
],
'dataProviders' => [
'Apc:storage' => [],
'Registry:storage' => [],
'Defined:model' => [],
'Factory:model' => [],
'Redis:cache' => [
'host' => 'localhost',
'port' => 6379
],
'File:cache' => [
'path' => dirname(__DIR__) . '/cache/'
],
'File:output' => [
'path' => null
],
'Null:cache' => [],
'Request:http' => [],
'Cli:prompt' => [],
'Session:php' => [],
'Registry:view_render' => [],
'Registry:model_repository' => [],
'Registry:action' => [],
'Registry:registry' => [],
'Router:route' => [],
'Mysqli:default' => [
'host' => 'localhost',
'username' => 'root',
'password' => '',
'charset' => 'utf8'
]
]
];