diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6b089e0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/.gitattributes export-ignore +/.gitignore export-ignore +/env export-ignore +/phpunit.xml.dist export-ignore +/spark export-ignore +/app export-ignore +/public export-ignore +/writable export-ignore +/phpunit.xml.dist export-ignore diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..daac9e5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014-2019 British Columbia Institute of Technology +Copyright (c) 2019-2021 CodeIgniter Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 275f015..6692596 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ ## What is CodeIgniter? -CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure. +CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More information can be found at the [official site](http://codeigniter.com). This repository holds the distributable version of the framework, -including the user guide. It has been built from the +including the user guide. It has been built from the [development repository](https://github.com/codeigniter4/CodeIgniter4). More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums. The user guide corresponding to this version of the framework can be found -[here](https://codeigniter4.github.io/userguide/). +[here](https://codeigniter4.github.io/userguide/). ## Important Change with index.php @@ -25,7 +25,6 @@ framework are exposed. **Please** read the user guide for a better explanation of how CI4 works! -The user guide updating and deployment is a bit awkward at the moment, but we are working on it! ## Repository Management @@ -33,7 +32,7 @@ We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss FEATURE REQUESTS. -This repository is a "distribution" one, built by our release preparation script. +This repository is a "distribution" one, built by our release preparation script. Problems with it can be raised on our forum, or as issues in the main repository. ## Contributing @@ -44,7 +43,7 @@ ## Server Requirements -PHP version 7.2 or higher is required, with the following extensions installed: +PHP version 7.2 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/app/Config/App.php b/app/Config/App.php index b91c058..933b5c8 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -1,268 +1,448 @@ - APPPATH * ]; * - * @var array + * @var array */ public $psr4 = [ APP_NAMESPACE => APPPATH, // For custom app namespace @@ -60,7 +60,7 @@ * 'MyClass' => '/path/to/class/file.php' * ]; * - * @var array + * @var array */ public $classmap = []; } diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php index 63fdd88..05a8612 100644 --- a/app/Config/Boot/development.php +++ b/app/Config/Boot/development.php @@ -1,32 +1,32 @@ + */ + public $file = [ + 'storePath' => WRITEPATH . 'cache/', + 'mode' => 0640, + ]; + + /** + * ------------------------------------------------------------------------- + * Memcached settings + * ------------------------------------------------------------------------- + * Your Memcached servers can be specified below, if you are using + * the Memcached drivers. + * + * @see https://codeigniter.com/user_guide/libraries/caching.html#memcached + * + * @var array + */ public $memcached = [ 'host' => '127.0.0.1', 'port' => 11211, @@ -84,14 +114,15 @@ 'raw' => false, ]; - /* - | ------------------------------------------------------------------------- - | Redis settings - | ------------------------------------------------------------------------- - | Your Redis server can be specified below, if you are using - | the Redis or Predis drivers. - | - */ + /** + * ------------------------------------------------------------------------- + * Redis settings + * ------------------------------------------------------------------------- + * Your Redis server can be specified below, if you are using + * the Redis or Predis drivers. + * + * @var array + */ public $redis = [ 'host' => '127.0.0.1', 'password' => null, @@ -100,21 +131,22 @@ 'database' => 0, ]; - /* - |-------------------------------------------------------------------------- - | Available Cache Handlers - |-------------------------------------------------------------------------- - | - | This is an array of cache engine alias' and class names. Only engines - | that are listed here are allowed to be used. - | - */ + /** + * -------------------------------------------------------------------------- + * Available Cache Handlers + * -------------------------------------------------------------------------- + * + * This is an array of cache engine alias' and class names. Only engines + * that are listed here are allowed to be used. + * + * @var array + */ public $validHandlers = [ - 'dummy' => \CodeIgniter\Cache\Handlers\DummyHandler::class, - 'file' => \CodeIgniter\Cache\Handlers\FileHandler::class, - 'memcached' => \CodeIgniter\Cache\Handlers\MemcachedHandler::class, - 'predis' => \CodeIgniter\Cache\Handlers\PredisHandler::class, - 'redis' => \CodeIgniter\Cache\Handlers\RedisHandler::class, - 'wincache' => \CodeIgniter\Cache\Handlers\WincacheHandler::class, + 'dummy' => DummyHandler::class, + 'file' => FileHandler::class, + 'memcached' => MemcachedHandler::class, + 'predis' => PredisHandler::class, + 'redis' => RedisHandler::class, + 'wincache' => WincacheHandler::class, ]; } diff --git a/app/Config/Constants.php b/app/Config/Constants.php index b25f71c..8f8498a 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -1,36 +1,38 @@ ` element. + * + * Will default to self if not overridden + * + * @var string|string[]|null + */ + public $baseURI = null; + + /** + * Lists the URLs for workers and embedded frame contents + * + * @var string|string[] + */ + public $childSrc = 'self'; + + /** + * Limits the origins that you can connect to (via XHR, + * WebSockets, and EventSource). + * + * @var string|string[] + */ + public $connectSrc = 'self'; + + /** + * Specifies the origins that can serve web fonts. + * + * @var string|string[] + */ + public $fontSrc = null; + + /** + * Lists valid endpoints for submission from `
` tags. + * + * @var string|string[] + */ + public $formAction = 'self'; + + /** + * Specifies the sources that can embed the current page. + * This directive applies to ``, `