Skip to content

Commit 1743947

Browse files
committed
Release 4.0.0-alpha.4
1 parent fc8f78e commit 1743947

File tree

102 files changed

+4927
-731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4927
-731
lines changed

app/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

app/Config/App.php

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
<?php namespace Config;
2+
3+
use CodeIgniter\Config\BaseConfig;
4+
5+
class App extends BaseConfig
6+
{
7+
8+
/*
9+
|--------------------------------------------------------------------------
10+
| Base Site URL
11+
|--------------------------------------------------------------------------
12+
|
13+
| URL to your CodeIgniter root. Typically this will be your base URL,
14+
| WITH a trailing slash:
15+
|
16+
| http://example.com/
17+
|
18+
| If this is not set then CodeIgniter will try guess the protocol, domain
19+
| and path to your installation. However, you should always configure this
20+
| explicitly and never rely on auto-guessing, especially in production
21+
| environments.
22+
|
23+
*/
24+
public $baseURL = '';
25+
26+
/*
27+
|--------------------------------------------------------------------------
28+
| Index File
29+
|--------------------------------------------------------------------------
30+
|
31+
| Typically this will be your index.php file, unless you've renamed it to
32+
| something else. If you are using mod_rewrite to remove the page set this
33+
| variable so that it is blank.
34+
|
35+
*/
36+
public $indexPage = 'index.php';
37+
38+
/*
39+
|--------------------------------------------------------------------------
40+
| URI PROTOCOL
41+
|--------------------------------------------------------------------------
42+
|
43+
| This item determines which getServer global should be used to retrieve the
44+
| URI string. The default setting of 'REQUEST_URI' works for most servers.
45+
| If your links do not seem to work, try one of the other delicious flavors:
46+
|
47+
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
48+
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
49+
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
50+
|
51+
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
52+
*/
53+
public $uriProtocol = 'REQUEST_URI';
54+
55+
/*
56+
|--------------------------------------------------------------------------
57+
| Default Locale
58+
|--------------------------------------------------------------------------
59+
|
60+
| The Locale roughly represents the language and location that your visitor
61+
| is viewing the site from. It affects the language strings and other
62+
| strings (like currency markers, numbers, etc), that your program
63+
| should run under for this request.
64+
|
65+
*/
66+
public $defaultLocale = 'en';
67+
68+
/*
69+
|--------------------------------------------------------------------------
70+
| Negotiate Locale
71+
|--------------------------------------------------------------------------
72+
|
73+
| If true, the current Request object will automatically determine the
74+
| language to use based on the value of the Accept-Language header.
75+
|
76+
| If false, no automatic detection will be performed.
77+
|
78+
*/
79+
public $negotiateLocale = false;
80+
81+
/*
82+
|--------------------------------------------------------------------------
83+
| Supported Locales
84+
|--------------------------------------------------------------------------
85+
|
86+
| If $negotiateLocale is true, this array lists the locales supported
87+
| by the application in descending order of priority. If no match is
88+
| found, the first locale will be used.
89+
|
90+
*/
91+
public $supportedLocales = ['en'];
92+
93+
/*
94+
|--------------------------------------------------------------------------
95+
| Application Timezone
96+
|--------------------------------------------------------------------------
97+
|
98+
| The default timezone that will be used in your application to display
99+
| dates with the date helper, and can be retrieved through app_timezone()
100+
|
101+
*/
102+
public $appTimezone = 'America/Chicago';
103+
104+
/*
105+
|--------------------------------------------------------------------------
106+
| Default Character Set
107+
|--------------------------------------------------------------------------
108+
|
109+
| This determines which character set is used by default in various methods
110+
| that require a character set to be provided.
111+
|
112+
| See http://php.net/htmlspecialchars for a list of supported charsets.
113+
|
114+
*/
115+
public $charset = 'UTF-8';
116+
117+
/*
118+
|--------------------------------------------------------------------------
119+
| URI PROTOCOL
120+
|--------------------------------------------------------------------------
121+
|
122+
| If true, this will force every request made to this application to be
123+
| made via a secure connection (HTTPS). If the incoming request is not
124+
| secure, the user will be redirected to a secure version of the page
125+
| and the HTTP Strict Transport Security header will be set.
126+
*/
127+
public $forceGlobalSecureRequests = false;
128+
129+
/*
130+
|--------------------------------------------------------------------------
131+
| Session Variables
132+
|--------------------------------------------------------------------------
133+
|
134+
| 'sessionDriver'
135+
|
136+
| The storage driver to use: files, database, redis, memcached
137+
| - CodeIgniter\Session\Handlers\FileHandler
138+
| - CodeIgniter\Session\Handlers\DatabaseHandler
139+
| - CodeIgniter\Session\Handlers\MemcachedHandler
140+
| - CodeIgniter\Session\Handlers\RedisHandler
141+
|
142+
| 'sessionCookieName'
143+
|
144+
| The session cookie name, must contain only [0-9a-z_-] characters
145+
|
146+
| 'sessionExpiration'
147+
|
148+
| The number of SECONDS you want the session to last.
149+
| Setting to 0 (zero) means expire when the browser is closed.
150+
|
151+
| 'sessionSavePath'
152+
|
153+
| The location to save sessions to, driver dependent.
154+
|
155+
| For the 'files' driver, it's a path to a writable directory.
156+
| WARNING: Only absolute paths are supported!
157+
|
158+
| For the 'database' driver, it's a table name.
159+
| Please read up the manual for the format with other session drivers.
160+
|
161+
| IMPORTANT: You are REQUIRED to set a valid save path!
162+
|
163+
| 'sessionMatchIP'
164+
|
165+
| Whether to match the user's IP address when reading the session data.
166+
|
167+
| WARNING: If you're using the database driver, don't forget to update
168+
| your session table's PRIMARY KEY when changing this setting.
169+
|
170+
| 'sessionTimeToUpdate'
171+
|
172+
| How many seconds between CI regenerating the session ID.
173+
|
174+
| 'sessionRegenerateDestroy'
175+
|
176+
| Whether to destroy session data associated with the old session ID
177+
| when auto-regenerating the session ID. When set to FALSE, the data
178+
| will be later deleted by the garbage collector.
179+
|
180+
| Other session cookie settings are shared with the rest of the application,
181+
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
182+
|
183+
*/
184+
public $sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler';
185+
public $sessionCookieName = 'ci_session';
186+
public $sessionExpiration = 7200;
187+
public $sessionSavePath = WRITEPATH . 'session';
188+
public $sessionMatchIP = false;
189+
public $sessionTimeToUpdate = 300;
190+
public $sessionRegenerateDestroy = false;
191+
192+
/*
193+
|--------------------------------------------------------------------------
194+
| Cookie Related Variables
195+
|--------------------------------------------------------------------------
196+
|
197+
| 'cookiePrefix' = Set a cookie name prefix if you need to avoid collisions
198+
| 'cookieDomain' = Set to .your-domain.com for site-wide cookies
199+
| 'cookiePath' = Typically will be a forward slash
200+
| 'cookieSecure' = Cookie will only be set if a secure HTTPS connection exists.
201+
| 'cookieHTTPOnly' = Cookie will only be accessible via HTTP(S) (no javascript)
202+
|
203+
| Note: These settings (with the exception of 'cookie_prefix' and
204+
| 'cookie_httponly') will also affect sessions.
205+
|
206+
*/
207+
public $cookiePrefix = '';
208+
public $cookieDomain = '';
209+
public $cookiePath = '/';
210+
public $cookieSecure = false;
211+
public $cookieHTTPOnly = false;
212+
213+
/*
214+
|--------------------------------------------------------------------------
215+
| Reverse Proxy IPs
216+
|--------------------------------------------------------------------------
217+
|
218+
| If your server is behind a reverse proxy, you must whitelist the proxy
219+
| IP addresses from which CodeIgniter should trust headers such as
220+
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
221+
| the visitor's IP address.
222+
|
223+
| You can use both an array or a comma-separated list of proxy addresses,
224+
| as well as specifying whole subnets. Here are a few examples:
225+
|
226+
| Comma-separated: '10.0.1.200,192.168.5.0/24'
227+
| Array: array('10.0.1.200', '192.168.5.0/24')
228+
*/
229+
public $proxyIPs = '';
230+
231+
/*
232+
|--------------------------------------------------------------------------
233+
| Cross Site Request Forgery
234+
|--------------------------------------------------------------------------
235+
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
236+
| checked on a submitted form. If you are accepting user data, it is strongly
237+
| recommended CSRF protection be enabled.
238+
|
239+
| CSRFTokenName = The token name
240+
| CSRFCookieName = The cookie name
241+
| CSRFExpire = The number in seconds the token should expire.
242+
| CSRFRegenerate = Regenerate token on every submission
243+
| CSRFRedirect = Redirect to previous page with error on failure
244+
*/
245+
public $CSRFTokenName = 'csrf_test_name';
246+
public $CSRFCookieName = 'csrf_cookie_name';
247+
public $CSRFExpire = 7200;
248+
public $CSRFRegenerate = true;
249+
public $CSRFRedirect = true;
250+
251+
/*
252+
|--------------------------------------------------------------------------
253+
| Content Security Policy
254+
|--------------------------------------------------------------------------
255+
| Enables the Response's Content Secure Policy to restrict the sources that
256+
| can be used for images, scripts, CSS files, audio, video, etc. If enabled,
257+
| the Response object will populate default values for the policy from the
258+
| ContentSecurityPolicy.php file. Controllers can always add to those
259+
| restrictions at run time.
260+
|
261+
| For a better understanding of CSP, see these documents:
262+
| - http://www.html5rocks.com/en/tutorials/security/content-security-policy/
263+
| - http://www.w3.org/TR/CSP/
264+
*/
265+
public $CSPEnabled = false;
266+
267+
/*
268+
|--------------------------------------------------------------------------
269+
| Application Salt
270+
|--------------------------------------------------------------------------
271+
|
272+
| The $salt can be used anywhere within the application that you need
273+
| to provide secure data. It should be different for every application
274+
| and can be of any length, though the more random the characters
275+
| the better.
276+
|
277+
*/
278+
public $salt = '';
279+
280+
//--------------------------------------------------------------------
281+
282+
}

app/Config/Autoload.php

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?php namespace Config;
2+
3+
require_once SYSTEMPATH . 'Config/AutoloadConfig.php';
4+
5+
/**
6+
* -------------------------------------------------------------------
7+
* AUTO-LOADER
8+
* -------------------------------------------------------------------
9+
* This file defines the namespaces and class maps so the Autoloader
10+
* can find the files as needed.
11+
*/
12+
class Autoload extends \CodeIgniter\Config\AutoloadConfig
13+
{
14+
public $psr4 = [];
15+
16+
public $classmap = [];
17+
18+
//--------------------------------------------------------------------
19+
20+
/**
21+
* Collects the application-specific autoload settings and merges
22+
* them with the framework's required settings.
23+
*
24+
* NOTE: If you use an identical key in $psr4 or $classmap, then
25+
* the values in this file will overwrite the framework's values.
26+
*/
27+
public function __construct()
28+
{
29+
parent::__construct();
30+
31+
/**
32+
* -------------------------------------------------------------------
33+
* Namespaces
34+
* -------------------------------------------------------------------
35+
* This maps the locations of any namespaces in your application
36+
* to their location on the file system. These are used by the
37+
* Autoloader to locate files the first time they have been instantiated.
38+
*
39+
* The '/application' and '/system' directories are already mapped for
40+
* you. You may change the name of the 'App' namespace if you wish,
41+
* but this should be done prior to creating any namespaced classes,
42+
* else you will need to modify all of those classes for this to work.
43+
*
44+
* DO NOT change the name of the CodeIgniter namespace or your application
45+
* WILL break. *
46+
* Prototype:
47+
*
48+
* $Config['psr4'] = [
49+
* 'CodeIgniter' => SYSPATH
50+
* `];
51+
*/
52+
$psr4 = [
53+
'Config' => APPPATH . 'Config',
54+
APP_NAMESPACE => APPPATH, // For custom namespace
55+
'App' => APPPATH, // To ensure filters, etc still found,
56+
];
57+
58+
/**
59+
* -------------------------------------------------------------------
60+
* Class Map
61+
* -------------------------------------------------------------------
62+
* The class map provides a map of class names and their exact
63+
* location on the drive. Classes loaded in this manner will have
64+
* slightly faster performance because they will not have to be
65+
* searched for within one or more directories as they would if they
66+
* were being autoloaded through a namespace.
67+
*
68+
* Prototype:
69+
*
70+
* $Config['classmap'] = [
71+
* 'MyClass' => '/path/to/class/file.php'
72+
* ];
73+
*/
74+
$classmap = [];
75+
76+
//--------------------------------------------------------------------
77+
// Do Not Edit Below This Line
78+
//--------------------------------------------------------------------
79+
80+
$this->psr4 = array_merge($this->psr4, $psr4);
81+
$this->classmap = array_merge($this->classmap, $classmap);
82+
83+
unset($psr4, $classmap);
84+
}
85+
86+
//--------------------------------------------------------------------
87+
88+
}

0 commit comments

Comments
 (0)