This repository was archived by the owner on Sep 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.php
More file actions
169 lines (160 loc) · 6.65 KB
/
config.php
File metadata and controls
169 lines (160 loc) · 6.65 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php declare(strict_types=1);
////////////////////////////////////////////////////////////////////////////////
// ___________ __ __ _____
// \_ _____/______ __ __ _____/ |_|__|/ ____\__ __
// | __) \_ __ \ | \_/ ___\ __\ \ __< | |
// | \ | | \/ | /\ \___| | | || | \___ |
// \___ / |__| |____/ \___ >__| |__||__| / ____|
// \/ \/ \/
// -----------------------------------------------------------------------------
// https://github.com/fructify
//
// Designed and Developed by Brad Jones <brad @="bjc.id.au" />
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
use Doctrine\Common\Cache\FilesystemCache;
return
[
// Hosting Environment
// -------------------------------------------------------------------------
// Add the current detected environment into the container.
// NOTE: ```FRUCTIFY_ENV``` is defined in your ```wp-config.php``` file.
// -------------------------------------------------------------------------
'hosting' =>
[
'env' => FRUCTIFY_ENV
],
// Session Settings
// -------------------------------------------------------------------------
// These defaults should work for 99% of cases.
// Obviously the child theme can override these settings easily.
//
// The session name is used by ```session_name```.
// http://php.net/manual/en/function.session-name.php
//
// It is also used to define the name of Aura.Session segment.
//
// Refer to the PHP documenation for the cookie settings.
// http://php.net/manual/en/function.session-set-cookie-params.php
// -------------------------------------------------------------------------
'session' =>
[
'name' => 'FRUCTIFY',
'cookie' =>
[
'lifetime' => 0,
'path' => '/',
'domain' => '',
'secure' => false,
'httponly' => true
]
],
// Database Connection Details
// -------------------------------------------------------------------------
// Add the database connection details into the container,
// just in case we want to connect using something other than wpdb.
// -------------------------------------------------------------------------
'db' =>
[
'name' => DB_NAME,
'user' => DB_USER,
'pass' => DB_PASSWORD,
'host' => DB_HOST,
'charset' => DB_CHARSET,
'collate' => DB_COLLATE,
'prefix' => DB_PREFIX
],
// Common File Paths
// -------------------------------------------------------------------------
// Here we define some commonly used file paths.
//
// NOTE: When running this theme directly, without a child theme,
// the parent and child file paths will resolve to the same locations.
// Many of the services determin if the theme is being run directly or
// via a child theme simply by comparing these paths.
// -------------------------------------------------------------------------
'paths' =>
[
'root' => ABSPATH,
'uploads' => ABSPATH.'/wp-content/uploads',
'cache' => ABSPATH.'/wp-content/uploads/cache',
'theme' =>
[
'parent' =>
[
'root' => __DIR__,
'hooks' => __DIR__.'/hooks',
'views' => __DIR__.'/views',
'routes' => __DIR__.'/routes',
'assets' => __DIR__.'/assets/dist',
'middleware' => __DIR__.'/middleware'
],
'child' =>
[
'root' => get_stylesheet_directory(),
'hooks' => get_stylesheet_directory().'/hooks',
'views' => get_stylesheet_directory().'/views',
'routes' => get_stylesheet_directory().'/routes',
'assets' => get_stylesheet_directory().'/assets/dist',
'middleware' => get_stylesheet_directory().'/middleware'
]
]
],
// Common URL Paths
// -------------------------------------------------------------------------
// Here we define some commonly used URL paths.
// -------------------------------------------------------------------------
'urls' =>
[
'root' => get_site_url(),
'uploads' => wp_upload_dir()['baseurl'],
'cache' => wp_upload_dir()['baseurl'].'/cache',
'theme' =>
[
'parent' =>
[
'root' => get_template_directory_uri(),
'assets' => get_template_directory_uri().'/assets/dist'
],
'child' =>
[
'root' => get_stylesheet_directory_uri(),
'assets' => get_stylesheet_directory_uri().'/assets/dist'
]
]
],
// Not Found View
// -------------------------------------------------------------------------
// When a ```League\Route\Http\Exception\NotFoundException``` is encounted
// in the dispatch method of the Router, this is the view that will be
// rendered instead of letting the Exception go unhandled.
// -------------------------------------------------------------------------
'notFound' => 'errors/404',
// Friendly Error View
// -------------------------------------------------------------------------
// While running on a production environment, when any exception or
// catchable error is encounted after the ErrorHandler middleware has been
// registered in the stack, this is the view that will be rendered by the
// ErrorHandler. On staging and development environments filp/whoops will
// output a detailed exception report.
// -------------------------------------------------------------------------
'friendlyError' => 'errors/500',
// Container Cache Driver
// -------------------------------------------------------------------------
// When running in a staging or production environment we will cache the
// IoC Container. By default we use a file based strategy, a child theme
// may override this and use a more performant driver.
//
// see: http://php-di.org/doc/performances.html
// -------------------------------------------------------------------------
'cache' =>
[
'container' =>
[
'driver' => function($config)
{
return new FilesystemCache($config->paths->cache.'/di');
}
]
]
];