diff --git a/.editorconfig b/.editorconfig
index 23a7072c587b..6de2d73170b0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,9 +4,11 @@ root = true
; Unix-style newlines
[*]
end_of_line = lf
+insert_final_newline = true
[*.php]
-indent_style = tab
+indent_style = space
+indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
diff --git a/application/Config/App.php b/application/Config/App.php
index 94a2bab44abf..1078e2ae4bec 100644
--- a/application/Config/App.php
+++ b/application/Config/App.php
@@ -5,301 +5,301 @@
class App extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Base Site URL
- |--------------------------------------------------------------------------
- |
- | URL to your CodeIgniter root. Typically this will be your base URL,
- | WITH a trailing slash:
- |
- | http://example.com/
- |
- | If this is not set then CodeIgniter will try guess the protocol, domain
- | and path to your installation. However, you should always configure this
- | explicitly and never rely on auto-guessing, especially in production
- | environments.
- |
- */
- public $baseURL = '';
+ /*
+ |--------------------------------------------------------------------------
+ | Base Site URL
+ |--------------------------------------------------------------------------
+ |
+ | URL to your CodeIgniter root. Typically this will be your base URL,
+ | WITH a trailing slash:
+ |
+ | http://example.com/
+ |
+ | If this is not set then CodeIgniter will try guess the protocol, domain
+ | and path to your installation. However, you should always configure this
+ | explicitly and never rely on auto-guessing, especially in production
+ | environments.
+ |
+ */
+ public $baseURL = '';
- /*
- |--------------------------------------------------------------------------
- | Index File
- |--------------------------------------------------------------------------
- |
- | Typically this will be your index.php file, unless you've renamed it to
- | something else. If you are using mod_rewrite to remove the page set this
- | variable so that it is blank.
- |
- */
- public $indexPage = 'index.php';
+ /*
+ |--------------------------------------------------------------------------
+ | Index File
+ |--------------------------------------------------------------------------
+ |
+ | Typically this will be your index.php file, unless you've renamed it to
+ | something else. If you are using mod_rewrite to remove the page set this
+ | variable so that it is blank.
+ |
+ */
+ public $indexPage = 'index.php';
- /*
- |--------------------------------------------------------------------------
- | URI PROTOCOL
- |--------------------------------------------------------------------------
- |
- | This item determines which getServer global should be used to retrieve the
- | URI string. The default setting of 'REQUEST_URI' works for most servers.
- | If your links do not seem to work, try one of the other delicious flavors:
- |
- | 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
- | 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
- | 'PATH_INFO' Uses $_SERVER['PATH_INFO']
- |
- | WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
- */
- public $uriProtocol = 'REQUEST_URI';
+ /*
+ |--------------------------------------------------------------------------
+ | URI PROTOCOL
+ |--------------------------------------------------------------------------
+ |
+ | This item determines which getServer global should be used to retrieve the
+ | URI string. The default setting of 'REQUEST_URI' works for most servers.
+ | If your links do not seem to work, try one of the other delicious flavors:
+ |
+ | 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
+ | 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
+ | 'PATH_INFO' Uses $_SERVER['PATH_INFO']
+ |
+ | WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
+ */
+ public $uriProtocol = 'REQUEST_URI';
- /*
- |--------------------------------------------------------------------------
- | Default Locale
- |--------------------------------------------------------------------------
- |
- | The Locale roughly represents the language and location that your visitor
- | is viewing the site from. It affects the language strings and other
- | strings (like currency markers, numbers, etc), that your program
- | should run under for this request.
- |
- */
- public $defaultLocale = 'en';
+ /*
+ |--------------------------------------------------------------------------
+ | Default Locale
+ |--------------------------------------------------------------------------
+ |
+ | The Locale roughly represents the language and location that your visitor
+ | is viewing the site from. It affects the language strings and other
+ | strings (like currency markers, numbers, etc), that your program
+ | should run under for this request.
+ |
+ */
+ public $defaultLocale = 'en';
- /*
- |--------------------------------------------------------------------------
- | Negotiate Locale
- |--------------------------------------------------------------------------
- |
- | If true, the current Request object will automatically determine the
- | language to use based on the value of the Accept-Language header.
- |
- | If false, no automatic detection will be performed.
- |
- */
- public $negotiateLocale = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Negotiate Locale
+ |--------------------------------------------------------------------------
+ |
+ | If true, the current Request object will automatically determine the
+ | language to use based on the value of the Accept-Language header.
+ |
+ | If false, no automatic detection will be performed.
+ |
+ */
+ public $negotiateLocale = false;
- /*
- |--------------------------------------------------------------------------
- | Supported Locales
- |--------------------------------------------------------------------------
- |
- | If $negotiateLocale is true, this array lists the locales supported
- | by the application in descending order of priority. If no match is
- | found, the first locale will be used.
- |
- */
- public $supportedLocales = ['en'];
+ /*
+ |--------------------------------------------------------------------------
+ | Supported Locales
+ |--------------------------------------------------------------------------
+ |
+ | If $negotiateLocale is true, this array lists the locales supported
+ | by the application in descending order of priority. If no match is
+ | found, the first locale will be used.
+ |
+ */
+ public $supportedLocales = ['en'];
- /*
- |--------------------------------------------------------------------------
- | Application Timezone
- |--------------------------------------------------------------------------
- |
- | The default timezone that will be used in your application to display
- | dates with the date helper, and can be retrieved through app_timezone()
- |
- */
- public $appTimezone = 'America/Chicago';
+ /*
+ |--------------------------------------------------------------------------
+ | Application Timezone
+ |--------------------------------------------------------------------------
+ |
+ | The default timezone that will be used in your application to display
+ | dates with the date helper, and can be retrieved through app_timezone()
+ |
+ */
+ public $appTimezone = 'America/Chicago';
- /*
- |--------------------------------------------------------------------------
- | Default Character Set
- |--------------------------------------------------------------------------
- |
- | This determines which character set is used by default in various methods
- | that require a character set to be provided.
- |
- | See http://php.net/htmlspecialchars for a list of supported charsets.
- |
- */
- public $charset = 'UTF-8';
+ /*
+ |--------------------------------------------------------------------------
+ | Default Character Set
+ |--------------------------------------------------------------------------
+ |
+ | This determines which character set is used by default in various methods
+ | that require a character set to be provided.
+ |
+ | See http://php.net/htmlspecialchars for a list of supported charsets.
+ |
+ */
+ public $charset = 'UTF-8';
- /*
- |--------------------------------------------------------------------------
- | URI PROTOCOL
- |--------------------------------------------------------------------------
- |
- | If true, this will force every request made to this application to be
- | made via a secure connection (HTTPS). If the incoming request is not
- | secure, the user will be redirected to a secure version of the page
- | and the HTTP Strict Transport Security header will be set.
- */
- public $forceGlobalSecureRequests = false;
+ /*
+ |--------------------------------------------------------------------------
+ | URI PROTOCOL
+ |--------------------------------------------------------------------------
+ |
+ | If true, this will force every request made to this application to be
+ | made via a secure connection (HTTPS). If the incoming request is not
+ | secure, the user will be redirected to a secure version of the page
+ | and the HTTP Strict Transport Security header will be set.
+ */
+ public $forceGlobalSecureRequests = false;
- /*
- |--------------------------------------------------------------------------
- | Session Variables
- |--------------------------------------------------------------------------
- |
- | 'sessionDriver'
- |
- | The storage driver to use: files, database, redis, memcached
- | - CodeIgniter\Session\Handlers\FileHandler
- | - CodeIgniter\Session\Handlers\DatabaseHandler
- | - CodeIgniter\Session\Handlers\MemcachedHandler
- | - CodeIgniter\Session\Handlers\RedisHandler
- |
- | 'sessionCookieName'
- |
- | The session cookie name, must contain only [0-9a-z_-] characters
- |
- | 'sessionExpiration'
- |
- | The number of SECONDS you want the session to last.
- | Setting to 0 (zero) means expire when the browser is closed.
- |
- | 'sessionSavePath'
- |
- | The location to save sessions to, driver dependent.
- |
- | For the 'files' driver, it's a path to a writable directory.
- | WARNING: Only absolute paths are supported!
- |
- | For the 'database' driver, it's a table name.
- | Please read up the manual for the format with other session drivers.
- |
- | IMPORTANT: You are REQUIRED to set a valid save path!
- |
- | 'sessionMatchIP'
- |
- | Whether to match the user's IP address when reading the session data.
- |
- | WARNING: If you're using the database driver, don't forget to update
- | your session table's PRIMARY KEY when changing this setting.
- |
- | 'sessionTimeToUpdate'
- |
- | How many seconds between CI regenerating the session ID.
- |
- | 'sessionRegenerateDestroy'
- |
- | Whether to destroy session data associated with the old session ID
- | when auto-regenerating the session ID. When set to FALSE, the data
- | will be later deleted by the garbage collector.
- |
- | Other session cookie settings are shared with the rest of the application,
- | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
- |
- */
- public $sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler';
- public $sessionCookieName = 'ci_session';
- public $sessionExpiration = 7200;
- public $sessionSavePath = null;
- public $sessionMatchIP = false;
- public $sessionTimeToUpdate = 300;
- public $sessionRegenerateDestroy = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Session Variables
+ |--------------------------------------------------------------------------
+ |
+ | 'sessionDriver'
+ |
+ | The storage driver to use: files, database, redis, memcached
+ | - CodeIgniter\Session\Handlers\FileHandler
+ | - CodeIgniter\Session\Handlers\DatabaseHandler
+ | - CodeIgniter\Session\Handlers\MemcachedHandler
+ | - CodeIgniter\Session\Handlers\RedisHandler
+ |
+ | 'sessionCookieName'
+ |
+ | The session cookie name, must contain only [0-9a-z_-] characters
+ |
+ | 'sessionExpiration'
+ |
+ | The number of SECONDS you want the session to last.
+ | Setting to 0 (zero) means expire when the browser is closed.
+ |
+ | 'sessionSavePath'
+ |
+ | The location to save sessions to, driver dependent.
+ |
+ | For the 'files' driver, it's a path to a writable directory.
+ | WARNING: Only absolute paths are supported!
+ |
+ | For the 'database' driver, it's a table name.
+ | Please read up the manual for the format with other session drivers.
+ |
+ | IMPORTANT: You are REQUIRED to set a valid save path!
+ |
+ | 'sessionMatchIP'
+ |
+ | Whether to match the user's IP address when reading the session data.
+ |
+ | WARNING: If you're using the database driver, don't forget to update
+ | your session table's PRIMARY KEY when changing this setting.
+ |
+ | 'sessionTimeToUpdate'
+ |
+ | How many seconds between CI regenerating the session ID.
+ |
+ | 'sessionRegenerateDestroy'
+ |
+ | Whether to destroy session data associated with the old session ID
+ | when auto-regenerating the session ID. When set to FALSE, the data
+ | will be later deleted by the garbage collector.
+ |
+ | Other session cookie settings are shared with the rest of the application,
+ | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
+ |
+ */
+ public $sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler';
+ public $sessionCookieName = 'ci_session';
+ public $sessionExpiration = 7200;
+ public $sessionSavePath = null;
+ public $sessionMatchIP = false;
+ public $sessionTimeToUpdate = 300;
+ public $sessionRegenerateDestroy = false;
- /*
- |--------------------------------------------------------------------------
- | Cookie Related Variables
- |--------------------------------------------------------------------------
- |
- | 'cookiePrefix' = Set a cookie name prefix if you need to avoid collisions
- | 'cookieDomain' = Set to .your-domain.com for site-wide cookies
- | 'cookiePath' = Typically will be a forward slash
- | 'cookieSecure' = Cookie will only be set if a secure HTTPS connection exists.
- | 'cookieHTTPOnly' = Cookie will only be accessible via HTTP(S) (no javascript)
- |
- | Note: These settings (with the exception of 'cookie_prefix' and
- | 'cookie_httponly') will also affect sessions.
- |
- */
- public $cookiePrefix = '';
- public $cookieDomain = '';
- public $cookiePath = '/';
- public $cookieSecure = false;
- public $cookieHTTPOnly = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Cookie Related Variables
+ |--------------------------------------------------------------------------
+ |
+ | 'cookiePrefix' = Set a cookie name prefix if you need to avoid collisions
+ | 'cookieDomain' = Set to .your-domain.com for site-wide cookies
+ | 'cookiePath' = Typically will be a forward slash
+ | 'cookieSecure' = Cookie will only be set if a secure HTTPS connection exists.
+ | 'cookieHTTPOnly' = Cookie will only be accessible via HTTP(S) (no javascript)
+ |
+ | Note: These settings (with the exception of 'cookie_prefix' and
+ | 'cookie_httponly') will also affect sessions.
+ |
+ */
+ public $cookiePrefix = '';
+ public $cookieDomain = '';
+ public $cookiePath = '/';
+ public $cookieSecure = false;
+ public $cookieHTTPOnly = false;
- /*
- |--------------------------------------------------------------------------
- | Reverse Proxy IPs
- |--------------------------------------------------------------------------
- |
- | If your getServer is behind a reverse proxy, you must whitelist the proxy
- | IP addresses from which CodeIgniter should trust headers such as
- | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
- | the visitor's IP address.
- |
- | You can use both an array or a comma-separated list of proxy addresses,
- | as well as specifying whole subnets. Here are a few examples:
- |
- | Comma-separated: '10.0.1.200,192.168.5.0/24'
- | Array: array('10.0.1.200', '192.168.5.0/24')
- */
- public $proxyIPs = '';
+ /*
+ |--------------------------------------------------------------------------
+ | Reverse Proxy IPs
+ |--------------------------------------------------------------------------
+ |
+ | If your getServer is behind a reverse proxy, you must whitelist the proxy
+ | IP addresses from which CodeIgniter should trust headers such as
+ | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
+ | the visitor's IP address.
+ |
+ | You can use both an array or a comma-separated list of proxy addresses,
+ | as well as specifying whole subnets. Here are a few examples:
+ |
+ | Comma-separated: '10.0.1.200,192.168.5.0/24'
+ | Array: array('10.0.1.200', '192.168.5.0/24')
+ */
+ public $proxyIPs = '';
- /*
- |--------------------------------------------------------------------------
- | Cross Site Request Forgery
- |--------------------------------------------------------------------------
- | Enables a CSRF cookie token to be set. When set to TRUE, token will be
- | checked on a submitted form. If you are accepting user data, it is strongly
- | recommended CSRF protection be enabled.
- |
- | CSRFTokenName = The token name
- | CSRFCookieName = The cookie name
- | CSRFExpire = The number in seconds the token should expire.
- | CSRFRegenerate = Regenerate token on every submission
- */
- public $CSRFTokenName = 'csrf_test_name';
- public $CSRFCookieName = 'csrf_cookie_name';
- public $CSRFExpire = 7200;
- public $CSRFRegenerate = true;
+ /*
+ |--------------------------------------------------------------------------
+ | Cross Site Request Forgery
+ |--------------------------------------------------------------------------
+ | Enables a CSRF cookie token to be set. When set to TRUE, token will be
+ | checked on a submitted form. If you are accepting user data, it is strongly
+ | recommended CSRF protection be enabled.
+ |
+ | CSRFTokenName = The token name
+ | CSRFCookieName = The cookie name
+ | CSRFExpire = The number in seconds the token should expire.
+ | CSRFRegenerate = Regenerate token on every submission
+ */
+ public $CSRFTokenName = 'csrf_test_name';
+ public $CSRFCookieName = 'csrf_cookie_name';
+ public $CSRFExpire = 7200;
+ public $CSRFRegenerate = true;
- /*
- |--------------------------------------------------------------------------
- | Content Security Policy
- |--------------------------------------------------------------------------
- | Enables the Response's Content Secure Policy to restrict the sources that
- | can be used for images, scripts, CSS files, audio, video, etc. If enabled,
- | the Response object will populate default values for the policy from the
- | ContentSecurityPolicy.php file. Controllers can always add to those
- | restrictions at run time.
- |
- | For a better understanding of CSP, see these documents:
- | - http://www.html5rocks.com/en/tutorials/security/content-security-policy/
- | - http://www.w3.org/TR/CSP/
- */
- public $CSPEnabled = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Content Security Policy
+ |--------------------------------------------------------------------------
+ | Enables the Response's Content Secure Policy to restrict the sources that
+ | can be used for images, scripts, CSS files, audio, video, etc. If enabled,
+ | the Response object will populate default values for the policy from the
+ | ContentSecurityPolicy.php file. Controllers can always add to those
+ | restrictions at run time.
+ |
+ | For a better understanding of CSP, see these documents:
+ | - http://www.html5rocks.com/en/tutorials/security/content-security-policy/
+ | - http://www.w3.org/TR/CSP/
+ */
+ public $CSPEnabled = false;
- /*
- |--------------------------------------------------------------------------
- | Debug Toolbar
- |--------------------------------------------------------------------------
- | The Debug Toolbar provides a way to see information about the performance
- | and state of your application during that page display. By default it will
- | NOT be displayed under production environments, and will only display if
- | CI_DEBUG is true, since if it's not, there's not much to display anyway.
- |
- | toolbarMaxHistory = Number of history files, 0 for none or -1 for unlimited
- |
- */
- public $toolbarCollectors = [
- 'CodeIgniter\Debug\Toolbar\Collectors\Timers',
- 'CodeIgniter\Debug\Toolbar\Collectors\Database',
- 'CodeIgniter\Debug\Toolbar\Collectors\Logs',
- 'CodeIgniter\Debug\Toolbar\Collectors\Views',
-// 'CodeIgniter\Debug\Toolbar\Collectors\Cache',
- 'CodeIgniter\Debug\Toolbar\Collectors\Files',
- 'CodeIgniter\Debug\Toolbar\Collectors\Routes',
- 'CodeIgniter\Debug\Toolbar\Collectors\Events',
- ];
- public $toolbarMaxHistory = 20;
+ /*
+ |--------------------------------------------------------------------------
+ | Debug Toolbar
+ |--------------------------------------------------------------------------
+ | The Debug Toolbar provides a way to see information about the performance
+ | and state of your application during that page display. By default it will
+ | NOT be displayed under production environments, and will only display if
+ | CI_DEBUG is true, since if it's not, there's not much to display anyway.
+ |
+ | toolbarMaxHistory = Number of history files, 0 for none or -1 for unlimited
+ |
+ */
+ public $toolbarCollectors = [
+ 'CodeIgniter\Debug\Toolbar\Collectors\Timers',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Database',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Logs',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Views',
+// 'CodeIgniter\Debug\Toolbar\Collectors\Cache',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Files',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Routes',
+ 'CodeIgniter\Debug\Toolbar\Collectors\Events',
+ ];
+ public $toolbarMaxHistory = 20;
- /*
- |--------------------------------------------------------------------------
- | Application Salt
- |--------------------------------------------------------------------------
- |
- | The $salt can be used anywhere within the application that you need
- | to provide secure data. It should be different for every application
- | and can be of any length, though the more random the characters
- | the better.
- |
- */
- public $salt = '';
+ /*
+ |--------------------------------------------------------------------------
+ | Application Salt
+ |--------------------------------------------------------------------------
+ |
+ | The $salt can be used anywhere within the application that you need
+ | to provide secure data. It should be different for every application
+ | and can be of any length, though the more random the characters
+ | the better.
+ |
+ */
+ public $salt = '';
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
}
diff --git a/application/Config/Autoload.php b/application/Config/Autoload.php
index 0dab676ce660..734c18443cbe 100644
--- a/application/Config/Autoload.php
+++ b/application/Config/Autoload.php
@@ -11,79 +11,79 @@
*/
class Autoload extends \CodeIgniter\Config\AutoloadConfig
{
- public $psr4 = [];
+ public $psr4 = [];
- public $classmap = [];
+ public $classmap = [];
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
- /**
- * Collects the application-specific autoload settings and merges
- * them with the framework's required settings.
- *
- * NOTE: If you use an identical key in $psr4 or $classmap, then
- * the values in this file will overwrite the framework's values.
- */
- public function __construct()
- {
- parent::__construct();
+ /**
+ * Collects the application-specific autoload settings and merges
+ * them with the framework's required settings.
+ *
+ * NOTE: If you use an identical key in $psr4 or $classmap, then
+ * the values in this file will overwrite the framework's values.
+ */
+ public function __construct()
+ {
+ parent::__construct();
- /**
- * -------------------------------------------------------------------
- * Namespaces
- * -------------------------------------------------------------------
- * This maps the locations of any namespaces in your application
- * to their location on the file system. These are used by the
- * Autoloader to locate files the first time they have been instantiated.
- *
- * The '/application' and '/system' directories are already mapped for
- * you. You may change the name of the 'App' namespace if you wish,
- * but this should be done prior to creating any namespaced classes,
- * else you will need to modify all of those classes for this to work.
- *
- * DO NOT change the name of the CodeIgniter namespace or your application
- * WILL break. *
- * Prototype:
- *
- * $Config['psr4'] = [
- * 'CodeIgniter' => SYSPATH
- * `];
- */
- $psr4 = [
- 'Config' => APPPATH.'Config',
- APP_NAMESPACE => APPPATH, // For custom namespace
- 'App' => APPPATH, // To ensure filters, etc still found,
- 'Tests\Support' => TESTPATH.'_support', // So custom migrations can run during testing
- ];
+ /**
+ * -------------------------------------------------------------------
+ * Namespaces
+ * -------------------------------------------------------------------
+ * This maps the locations of any namespaces in your application
+ * to their location on the file system. These are used by the
+ * Autoloader to locate files the first time they have been instantiated.
+ *
+ * The '/application' and '/system' directories are already mapped for
+ * you. You may change the name of the 'App' namespace if you wish,
+ * but this should be done prior to creating any namespaced classes,
+ * else you will need to modify all of those classes for this to work.
+ *
+ * DO NOT change the name of the CodeIgniter namespace or your application
+ * WILL break. *
+ * Prototype:
+ *
+ * $Config['psr4'] = [
+ * 'CodeIgniter' => SYSPATH
+ * `];
+ */
+ $psr4 = [
+ 'Config' => APPPATH.'Config',
+ APP_NAMESPACE => APPPATH, // For custom namespace
+ 'App' => APPPATH, // To ensure filters, etc still found,
+ 'Tests\Support' => TESTPATH.'_support', // So custom migrations can run during testing
+ ];
- /**
- * -------------------------------------------------------------------
- * Class Map
- * -------------------------------------------------------------------
- * The class map provides a map of class names and their exact
- * location on the drive. Classes loaded in this manner will have
- * slightly faster performance because they will not have to be
- * searched for within one or more directories as they would if they
- * were being autoloaded through a namespace.
- *
- * Prototype:
- *
- * $Config['classmap'] = [
- * 'MyClass' => '/path/to/class/file.php'
- * ];
- */
- $classmap = [];
+ /**
+ * -------------------------------------------------------------------
+ * Class Map
+ * -------------------------------------------------------------------
+ * The class map provides a map of class names and their exact
+ * location on the drive. Classes loaded in this manner will have
+ * slightly faster performance because they will not have to be
+ * searched for within one or more directories as they would if they
+ * were being autoloaded through a namespace.
+ *
+ * Prototype:
+ *
+ * $Config['classmap'] = [
+ * 'MyClass' => '/path/to/class/file.php'
+ * ];
+ */
+ $classmap = [];
- //--------------------------------------------------------------------
- // Do Not Edit Below This Line
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
+ // Do Not Edit Below This Line
+ //--------------------------------------------------------------------
- $this->psr4 = array_merge($this->psr4, $psr4);
- $this->classmap = array_merge($this->classmap, $classmap);
+ $this->psr4 = array_merge($this->psr4, $psr4);
+ $this->classmap = array_merge($this->classmap, $classmap);
- unset($psr4, $classmap);
- }
+ unset($psr4, $classmap);
+ }
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
}
diff --git a/application/Config/Cache.php b/application/Config/Cache.php
index 781432aae7ab..0a76d50985bd 100644
--- a/application/Config/Cache.php
+++ b/application/Config/Cache.php
@@ -4,116 +4,116 @@
class Cache extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Primary Handler
- |--------------------------------------------------------------------------
- |
- | The name of the preferred handler that should be used. If for some reason
- | it is not available, the $backupHandler will be used in its place.
- |
- */
- public $handler = 'file';
+ /*
+ |--------------------------------------------------------------------------
+ | Primary Handler
+ |--------------------------------------------------------------------------
+ |
+ | The name of the preferred handler that should be used. If for some reason
+ | it is not available, the $backupHandler will be used in its place.
+ |
+ */
+ public $handler = 'file';
- /*
- |--------------------------------------------------------------------------
- | Backup Handler
- |--------------------------------------------------------------------------
- |
- | The name of the handler that will be used in case the first one is
- | unreachable. Often, 'file' is used here since the filesystem is
- | always available, though that's not always practical for the app.
- |
- */
- public $backupHandler = 'dummy';
+ /*
+ |--------------------------------------------------------------------------
+ | Backup Handler
+ |--------------------------------------------------------------------------
+ |
+ | The name of the handler that will be used in case the first one is
+ | unreachable. Often, 'file' is used here since the filesystem is
+ | always available, though that's not always practical for the app.
+ |
+ */
+ public $backupHandler = 'dummy';
- /*
- |--------------------------------------------------------------------------
- | Cache Directory Path
- |--------------------------------------------------------------------------
- |
- | The path to where cache files should be stored, if using a file-based
- | system.
- |
- */
- public $storePath = WRITEPATH.'cache/';
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Directory Path
+ |--------------------------------------------------------------------------
+ |
+ | The path to where cache files should be stored, if using a file-based
+ | system.
+ |
+ */
+ public $storePath = WRITEPATH.'cache/';
- /*
- |--------------------------------------------------------------------------
- | Cache Include Query String
- |--------------------------------------------------------------------------
- |
- | Whether to take the URL query string into consideration when generating
- | output cache files. Valid options are:
- |
- | false = Disabled
- | true = Enabled, take all query parameters into account.
- | Please be aware that this may result in numerous cache
- | files generated for the same page over and over again.
- | array('q') = Enabled, but only take into account the specified list
- | of query parameters.
- |
- */
- public $cacheQueryString = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Include Query String
+ |--------------------------------------------------------------------------
+ |
+ | Whether to take the URL query string into consideration when generating
+ | output cache files. Valid options are:
+ |
+ | false = Disabled
+ | true = Enabled, take all query parameters into account.
+ | Please be aware that this may result in numerous cache
+ | files generated for the same page over and over again.
+ | array('q') = Enabled, but only take into account the specified list
+ | of query parameters.
+ |
+ */
+ public $cacheQueryString = false;
- /*
- |--------------------------------------------------------------------------
- | Key Prefix
- |--------------------------------------------------------------------------
- |
- | This string is added to all cache item names to help avoid collisions
- | if you run multiple applications with the same cache engine.
- |
- */
- public $prefix = '';
+ /*
+ |--------------------------------------------------------------------------
+ | Key Prefix
+ |--------------------------------------------------------------------------
+ |
+ | This string is added to all cache item names to help avoid collisions
+ | if you run multiple applications with the same cache engine.
+ |
+ */
+ public $prefix = '';
- /*
- | -------------------------------------------------------------------------
- | 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
- |
- */
- public $memcached = [
- 'host' => '127.0.0.1',
- 'port' => 11211,
- 'weight' => 1,
- 'raw' => false,
- ];
+ /*
+ | -------------------------------------------------------------------------
+ | 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
+ |
+ */
+ public $memcached = [
+ 'host' => '127.0.0.1',
+ 'port' => 11211,
+ 'weight' => 1,
+ 'raw' => false,
+ ];
- /*
- | -------------------------------------------------------------------------
- | Redis settings
- | -------------------------------------------------------------------------
- | Your Redis server can be specified below, if you are using
- | the Redis or Predis drivers.
- |
- */
- public $redis = [
- 'host' => '127.0.0.1',
- 'password' => null,
- 'port' => 6379,
- 'timeout' => 0,
- ];
+ /*
+ | -------------------------------------------------------------------------
+ | Redis settings
+ | -------------------------------------------------------------------------
+ | Your Redis server can be specified below, if you are using
+ | the Redis or Predis drivers.
+ |
+ */
+ public $redis = [
+ 'host' => '127.0.0.1',
+ 'password' => null,
+ 'port' => 6379,
+ 'timeout' => 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.
- |
- */
- 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,
- ];
+ /*
+ |--------------------------------------------------------------------------
+ | 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.
+ |
+ */
+ 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,
+ ];
}
diff --git a/application/Config/ContentSecurityPolicy.php b/application/Config/ContentSecurityPolicy.php
index 6a79136c1ebb..22c0ad17a51f 100644
--- a/application/Config/ContentSecurityPolicy.php
+++ b/application/Config/ContentSecurityPolicy.php
@@ -13,37 +13,37 @@
*/
class ContentSecurityPolicy extends BaseConfig
{
- public $reportOnly = false;
+ public $reportOnly = false;
- public $defaultSrc = 'none';
+ public $defaultSrc = 'none';
- public $scriptSrc = 'self';
+ public $scriptSrc = 'self';
- public $styleSrc = 'self';
+ public $styleSrc = 'self';
- public $imageSrc = 'self';
+ public $imageSrc = 'self';
- public $base_uri = null;
+ public $base_uri = null;
- public $childSrc = null;
+ public $childSrc = null;
- public $connectSrc = 'self';
+ public $connectSrc = 'self';
- public $fontSrc = null;
+ public $fontSrc = null;
- public $formAction = null;
+ public $formAction = null;
- public $frameAncestors = null;
+ public $frameAncestors = null;
- public $mediaSrc = null;
+ public $mediaSrc = null;
- public $objectSrc = null;
+ public $objectSrc = null;
- public $pluginTypes = null;
+ public $pluginTypes = null;
- public $reportURI = null;
+ public $reportURI = null;
- public $sandbox = false;
+ public $sandbox = false;
- public $upgradeInsecureRequests = false;
+ public $upgradeInsecureRequests = false;
}
diff --git a/application/Config/Database.php b/application/Config/Database.php
index f6c867c878c8..839186347179 100644
--- a/application/Config/Database.php
+++ b/application/Config/Database.php
@@ -7,107 +7,107 @@
*/
class Database extends \CodeIgniter\Database\Config
{
- /**
- * The directory that holds the Migrations
- * and Seeds directories.
- * @var string
- */
- public $filesPath = APPPATH.'Database/';
+ /**
+ * The directory that holds the Migrations
+ * and Seeds directories.
+ * @var string
+ */
+ public $filesPath = APPPATH.'Database/';
- /**
- * Lets you choose which connection group to
- * use if no other is specified.
- *
- * @var string
- */
- public $defaultGroup = 'default';
+ /**
+ * Lets you choose which connection group to
+ * use if no other is specified.
+ *
+ * @var string
+ */
+ public $defaultGroup = 'default';
- /**
- * The default database connection.
- *
- * @var array
- */
- public $default = [
- 'DSN' => '',
- 'hostname' => 'localhost',
- 'username' => '',
- 'password' => '',
- 'database' => '',
- 'DBDriver' => 'MySQLi',
- 'DBPrefix' => '',
- 'pConnect' => false,
- 'DBDebug' => (ENVIRONMENT !== 'production'),
- 'cacheOn' => false,
- 'cacheDir' => '',
- 'charset' => 'utf8',
- 'DBCollat' => 'utf8_general_ci',
- 'swapPre' => '',
- 'encrypt' => false,
- 'compress' => false,
- 'strictOn' => false,
- 'failover' => [],
- 'port' => 3306
- ];
+ /**
+ * The default database connection.
+ *
+ * @var array
+ */
+ public $default = [
+ 'DSN' => '',
+ 'hostname' => 'localhost',
+ 'username' => '',
+ 'password' => '',
+ 'database' => '',
+ 'DBDriver' => 'MySQLi',
+ 'DBPrefix' => '',
+ 'pConnect' => false,
+ 'DBDebug' => (ENVIRONMENT !== 'production'),
+ 'cacheOn' => false,
+ 'cacheDir' => '',
+ 'charset' => 'utf8',
+ 'DBCollat' => 'utf8_general_ci',
+ 'swapPre' => '',
+ 'encrypt' => false,
+ 'compress' => false,
+ 'strictOn' => false,
+ 'failover' => [],
+ 'port' => 3306
+ ];
- /**
- * This database connection is used when
- * running PHPUnit database tests.
- *
- * @var array
- */
- public $tests = [
- 'DSN' => '',
- 'hostname' => '127.0.0.1',
- 'username' => '',
- 'password' => '',
- 'database' => '',
- 'DBDriver' => '',
- 'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE.
- 'pConnect' => false,
- 'DBDebug' => (ENVIRONMENT !== 'production'),
- 'cacheOn' => false,
- 'cacheDir' => '',
- 'charset' => 'utf8',
- 'DBCollat' => 'utf8_general_ci',
- 'swapPre' => '',
- 'encrypt' => false,
- 'compress' => false,
- 'strictOn' => false,
- 'failover' => [],
- 'port' => 3306
- ];
+ /**
+ * This database connection is used when
+ * running PHPUnit database tests.
+ *
+ * @var array
+ */
+ public $tests = [
+ 'DSN' => '',
+ 'hostname' => '127.0.0.1',
+ 'username' => '',
+ 'password' => '',
+ 'database' => '',
+ 'DBDriver' => '',
+ 'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE.
+ 'pConnect' => false,
+ 'DBDebug' => (ENVIRONMENT !== 'production'),
+ 'cacheOn' => false,
+ 'cacheDir' => '',
+ 'charset' => 'utf8',
+ 'DBCollat' => 'utf8_general_ci',
+ 'swapPre' => '',
+ 'encrypt' => false,
+ 'compress' => false,
+ 'strictOn' => false,
+ 'failover' => [],
+ 'port' => 3306
+ ];
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
- public function __construct()
- {
- parent::__construct();
+ public function __construct()
+ {
+ parent::__construct();
- // Ensure that we always set the database group to 'tests' if
- // we are currently running an automated test suite, so that
- // we don't overwrite live data on accident.
- if (ENVIRONMENT == 'testing')
- {
- $this->defaultGroup = 'tests';
+ // Ensure that we always set the database group to 'tests' if
+ // we are currently running an automated test suite, so that
+ // we don't overwrite live data on accident.
+ if (ENVIRONMENT == 'testing')
+ {
+ $this->defaultGroup = 'tests';
- // Under Travis-CI, we can set an ENV var named 'DB_GROUP'
- // so that we can test against multiple databases.
- if ($group = getenv('DB'))
- {
- if (is_file(TESTPATH.'travis/Database.php'))
- {
- require TESTPATH.'travis/Database.php';
+ // Under Travis-CI, we can set an ENV var named 'DB_GROUP'
+ // so that we can test against multiple databases.
+ if ($group = getenv('DB'))
+ {
+ if (is_file(TESTPATH.'travis/Database.php'))
+ {
+ require TESTPATH.'travis/Database.php';
- if ( ! empty($dbconfig) && array_key_exists($group, $dbconfig))
- {
- $this->tests = $dbconfig[$group];
- }
- }
- }
- }
- }
+ if ( ! empty($dbconfig) && array_key_exists($group, $dbconfig))
+ {
+ $this->tests = $dbconfig[$group];
+ }
+ }
+ }
+ }
+ }
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
}
diff --git a/application/Config/DocTypes.php b/application/Config/DocTypes.php
index 37830984c31f..91223ca06d2d 100755
--- a/application/Config/DocTypes.php
+++ b/application/Config/DocTypes.php
@@ -8,26 +8,26 @@
class DocTypes
{
- static $list =
- [
- 'xhtml11' => '',
- 'xhtml1-strict' => '',
- 'xhtml1-trans' => '',
- 'xhtml1-frame' => '',
- 'xhtml-basic11' => '',
- 'html5' => '',
- 'html4-strict' => '',
- 'html4-trans' => '',
- 'html4-frame' => '',
- 'mathml1' => '',
- 'mathml2' => '',
- 'svg10' => '',
- 'svg11' => '',
- 'svg11-basic' => '',
- 'svg11-tiny' => '',
- 'xhtml-math-svg-xh' => '',
- 'xhtml-math-svg-sh' => '',
- 'xhtml-rdfa-1' => '',
- 'xhtml-rdfa-2' => ''
- ];
-}
\ No newline at end of file
+ static $list =
+ [
+ 'xhtml11' => '',
+ 'xhtml1-strict' => '',
+ 'xhtml1-trans' => '',
+ 'xhtml1-frame' => '',
+ 'xhtml-basic11' => '',
+ 'html5' => '',
+ 'html4-strict' => '',
+ 'html4-trans' => '',
+ 'html4-frame' => '',
+ 'mathml1' => '',
+ 'mathml2' => '',
+ 'svg10' => '',
+ 'svg11' => '',
+ 'svg11-basic' => '',
+ 'svg11-tiny' => '',
+ 'xhtml-math-svg-xh' => '',
+ 'xhtml-math-svg-sh' => '',
+ 'xhtml-rdfa-1' => '',
+ 'xhtml-rdfa-2' => ''
+ ];
+}
diff --git a/application/Config/Email.php b/application/Config/Email.php
index c5dfd13ae70e..0e1e8e88f51d 100644
--- a/application/Config/Email.php
+++ b/application/Config/Email.php
@@ -2,139 +2,139 @@
class Email
{
- /**
- * @var string
- */
- public $fromEmail;
-
- /**
- * @var string
- */
- public $fromName;
-
- /**
- * The "user agent"
- * @var string
- */
- public $userAgent = 'CodeIgniter';
-
- /**
- * The mail sending protocol: mail, sendmail, smtp
- * @var string
- */
- public $protocol = 'mail';
-
- /**
- * The server path to Sendmail.
- * @var string
- */
- public $mailPath = '/usr/sbin/sendmail';
-
- /**
- * SMTP Server Address
- * @var string
- */
- public $SMTPHost;
-
- /**
- * SMTP Username
- * @var string
- */
- public $SMTPUser;
-
- /**
- * SMTP Password
- * @var string
- */
- public $SMTPPass;
-
- /**
- * SMTP Port
- * @var int
- */
- public $SMTPPort = 25;
-
- /**
- * SMTP Timeout (in seconds)
- * @var int
- */
- public $SMTPTimeout = 5;
-
- /**
- * Enable persistent SMTP connections
- * @var bool
- */
- public $SMTPKeepAlive = false;
-
- /**
- * SMTP Encryption. Either tls or ssl
- * @var string
- */
- public $SMTPCrypto = 'tls';
-
- /**
- * Enable word-wrap
- * @var bool
- */
- public $wordWrap = true;
-
- /**
- * Character count to wrap at
- * @var int
- */
- public $wrapChars = 76;
-
- /**
- * Type of mail, either 'text' or 'html'
- * @var string
- */
- public $mailType = 'text';
-
- /**
- * Character set (utf-8, iso-8859-1, etc.)
- * @var string
- */
- public $charset = 'UTF-8';
-
- /**
- * Whether to validate the email address
- * @var bool
- */
- public $validate = false;
-
- /**
- * Email Priority. 1 = highest. 5 = lowest. 3 = normal
- * @var int
- */
- public $priority = 3;
-
- /**
- * Newline character. (Use “\r\n” to comply with RFC 822)
- * @var string
- */
- public $CRLF = "\r\n";
-
- /**
- * Newline character. (Use “\r\n” to comply with RFC 822)
- * @var string
- */
- public $newline = "\r\n";
-
- /**
- * Enable BCC Batch Mode.
- * @var bool
- */
- public $BCCBatchMode = false;
-
- /**
- * Number of emails in each BCC batch
- * @var int
- */
- public $BCCBatchSize = 200;
-
- /**
- * Enable notify message from server
- * @var bool
- */
- public $DSN = false;
+ /**
+ * @var string
+ */
+ public $fromEmail;
+
+ /**
+ * @var string
+ */
+ public $fromName;
+
+ /**
+ * The "user agent"
+ * @var string
+ */
+ public $userAgent = 'CodeIgniter';
+
+ /**
+ * The mail sending protocol: mail, sendmail, smtp
+ * @var string
+ */
+ public $protocol = 'mail';
+
+ /**
+ * The server path to Sendmail.
+ * @var string
+ */
+ public $mailPath = '/usr/sbin/sendmail';
+
+ /**
+ * SMTP Server Address
+ * @var string
+ */
+ public $SMTPHost;
+
+ /**
+ * SMTP Username
+ * @var string
+ */
+ public $SMTPUser;
+
+ /**
+ * SMTP Password
+ * @var string
+ */
+ public $SMTPPass;
+
+ /**
+ * SMTP Port
+ * @var int
+ */
+ public $SMTPPort = 25;
+
+ /**
+ * SMTP Timeout (in seconds)
+ * @var int
+ */
+ public $SMTPTimeout = 5;
+
+ /**
+ * Enable persistent SMTP connections
+ * @var bool
+ */
+ public $SMTPKeepAlive = false;
+
+ /**
+ * SMTP Encryption. Either tls or ssl
+ * @var string
+ */
+ public $SMTPCrypto = 'tls';
+
+ /**
+ * Enable word-wrap
+ * @var bool
+ */
+ public $wordWrap = true;
+
+ /**
+ * Character count to wrap at
+ * @var int
+ */
+ public $wrapChars = 76;
+
+ /**
+ * Type of mail, either 'text' or 'html'
+ * @var string
+ */
+ public $mailType = 'text';
+
+ /**
+ * Character set (utf-8, iso-8859-1, etc.)
+ * @var string
+ */
+ public $charset = 'UTF-8';
+
+ /**
+ * Whether to validate the email address
+ * @var bool
+ */
+ public $validate = false;
+
+ /**
+ * Email Priority. 1 = highest. 5 = lowest. 3 = normal
+ * @var int
+ */
+ public $priority = 3;
+
+ /**
+ * Newline character. (Use “\r\n” to comply with RFC 822)
+ * @var string
+ */
+ public $CRLF = "\r\n";
+
+ /**
+ * Newline character. (Use “\r\n” to comply with RFC 822)
+ * @var string
+ */
+ public $newline = "\r\n";
+
+ /**
+ * Enable BCC Batch Mode.
+ * @var bool
+ */
+ public $BCCBatchMode = false;
+
+ /**
+ * Number of emails in each BCC batch
+ * @var int
+ */
+ public $BCCBatchSize = 200;
+
+ /**
+ * Enable notify message from server
+ * @var bool
+ */
+ public $DSN = false;
}
diff --git a/application/Config/Events.php b/application/Config/Events.php
index 47781585a450..721cde7b35b9 100644
--- a/application/Config/Events.php
+++ b/application/Config/Events.php
@@ -29,8 +29,8 @@
*/
if (ENVIRONMENT != 'production')
{
- Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
+ Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
- // Handles the display of the toolbar itself. MUST remain here for toolbar to be displayed.
- Events::on('pre_system', 'CodeIgniter\Debug\Toolbar::eventHandler');
+ // Handles the display of the toolbar itself. MUST remain here for toolbar to be displayed.
+ Events::on('pre_system', 'CodeIgniter\Debug\Toolbar::eventHandler');
}
diff --git a/application/Config/Exceptions.php b/application/Config/Exceptions.php
index 3b3fa2779169..2c6a6b7f60b8 100644
--- a/application/Config/Exceptions.php
+++ b/application/Config/Exceptions.php
@@ -7,34 +7,34 @@
*/
class Exceptions
{
- /*
- |--------------------------------------------------------------------------
- | LOG EXCEPTIONS?
- |--------------------------------------------------------------------------
- | If true, then exceptions will be logged
- | through Services::Log.
- |
- | Default: true
- */
- public $log = true;
+ /*
+ |--------------------------------------------------------------------------
+ | LOG EXCEPTIONS?
+ |--------------------------------------------------------------------------
+ | If true, then exceptions will be logged
+ | through Services::Log.
+ |
+ | Default: true
+ */
+ public $log = true;
- /*
- |--------------------------------------------------------------------------
- | DO NOT LOG STATUS CODES
- |--------------------------------------------------------------------------
- | Any status codes here will NOT be logged if logging is turned on.
- | By default, only 404 (Page Not Found) exceptions are ignored.
- */
- public $ignoreCodes = [ 404 ];
+ /*
+ |--------------------------------------------------------------------------
+ | DO NOT LOG STATUS CODES
+ |--------------------------------------------------------------------------
+ | Any status codes here will NOT be logged if logging is turned on.
+ | By default, only 404 (Page Not Found) exceptions are ignored.
+ */
+ public $ignoreCodes = [ 404 ];
- /*
- |--------------------------------------------------------------------------
- | Error Views Path
- |--------------------------------------------------------------------------
- | This is the path to the directory that contains the 'cli' and 'html'
- | directories that hold the views used to generate errors.
- |
- | Default: APPPATH.'Views/errors'
- */
- public $errorViewPath = APPPATH.'Views/errors';
+ /*
+ |--------------------------------------------------------------------------
+ | Error Views Path
+ |--------------------------------------------------------------------------
+ | This is the path to the directory that contains the 'cli' and 'html'
+ | directories that hold the views used to generate errors.
+ |
+ | Default: APPPATH.'Views/errors'
+ */
+ public $errorViewPath = APPPATH.'Views/errors';
}
diff --git a/application/Config/Filters.php b/application/Config/Filters.php
index cb16f8137b64..81219f480bd0 100644
--- a/application/Config/Filters.php
+++ b/application/Config/Filters.php
@@ -4,30 +4,30 @@
class Filters extends BaseConfig
{
- // Makes reading things below nicer,
- // and simpler to change out script that's used.
- public $aliases = [
- 'csrf' => \App\Filters\CSRF::class,
- 'toolbar' => \App\Filters\DebugToolbar::class,
- ];
+ // Makes reading things below nicer,
+ // and simpler to change out script that's used.
+ public $aliases = [
+ 'csrf' => \App\Filters\CSRF::class,
+ 'toolbar' => \App\Filters\DebugToolbar::class,
+ ];
- // Always applied before every request
- public $globals = [
- 'before' => [
- // 'csrf'
- ],
- 'after' => [
- 'toolbar'
- ]
- ];
+ // Always applied before every request
+ public $globals = [
+ 'before' => [
+ // 'csrf'
+ ],
+ 'after' => [
+ 'toolbar'
+ ]
+ ];
- // Works on all of a particular HTTP method
- // (GET, POST, etc) as BEFORE filters only
- // like: 'post' => ['CSRF', 'throttle'],
- public $methods = [];
+ // Works on all of a particular HTTP method
+ // (GET, POST, etc) as BEFORE filters only
+ // like: 'post' => ['CSRF', 'throttle'],
+ public $methods = [];
- // List filter aliases and any before/after uri patterns
- // that they should run on, like:
- // 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']],
- public $filters = [];
+ // List filter aliases and any before/after uri patterns
+ // that they should run on, like:
+ // 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']],
+ public $filters = [];
}
diff --git a/application/Config/Format.php b/application/Config/Format.php
index 57cb81ed82c0..88ceee8a8848 100644
--- a/application/Config/Format.php
+++ b/application/Config/Format.php
@@ -4,68 +4,68 @@
class Format extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Available Response Formats
- |--------------------------------------------------------------------------
- |
- | When you perform content negotiation with the request, these are the
- | available formats that your application supports. This is currently
- | only used with the API\ResponseTrait. A valid Formatter must exist
- | for the specified format.
- |
- | These formats are only checked when the data passed to the respond()
- | method is an array.
- |
- */
- public $supportedResponseFormats = [
- 'application/json',
- 'application/xml', // machine-readable XML
- 'text/xml' // human-readable XML
- ];
+ /*
+ |--------------------------------------------------------------------------
+ | Available Response Formats
+ |--------------------------------------------------------------------------
+ |
+ | When you perform content negotiation with the request, these are the
+ | available formats that your application supports. This is currently
+ | only used with the API\ResponseTrait. A valid Formatter must exist
+ | for the specified format.
+ |
+ | These formats are only checked when the data passed to the respond()
+ | method is an array.
+ |
+ */
+ public $supportedResponseFormats = [
+ 'application/json',
+ 'application/xml', // machine-readable XML
+ 'text/xml' // human-readable XML
+ ];
- /*
- |--------------------------------------------------------------------------
- | Formatters
- |--------------------------------------------------------------------------
- |
- | Lists the class to use to format responses with of a particular type.
- | For each mime type, list the class that should be used. Formatters
- | can be retrieved through the getFormatter() method.
- |
- */
- public $formatters = [
- 'application/json' => \CodeIgniter\Format\JSONFormatter::class,
- 'application/xml' => \CodeIgniter\Format\XMLFormatter::class,
- 'text/xml' => \CodeIgniter\Format\XMLFormatter::class,
- ];
+ /*
+ |--------------------------------------------------------------------------
+ | Formatters
+ |--------------------------------------------------------------------------
+ |
+ | Lists the class to use to format responses with of a particular type.
+ | For each mime type, list the class that should be used. Formatters
+ | can be retrieved through the getFormatter() method.
+ |
+ */
+ public $formatters = [
+ 'application/json' => \CodeIgniter\Format\JSONFormatter::class,
+ 'application/xml' => \CodeIgniter\Format\XMLFormatter::class,
+ 'text/xml' => \CodeIgniter\Format\XMLFormatter::class,
+ ];
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
- /**
- * A Factory method to return the appropriate formatter for the given mime type.
- *
- * @param string $mime
- *
- * @return \CodeIgniter\Format\FormatterInterface
- */
- public function getFormatter(string $mime)
- {
- if (! array_key_exists($mime, $this->formatters))
- {
- throw new \InvalidArgumentException('No Formatter defined for mime type: '. $mime);
- }
+ /**
+ * A Factory method to return the appropriate formatter for the given mime type.
+ *
+ * @param string $mime
+ *
+ * @return \CodeIgniter\Format\FormatterInterface
+ */
+ public function getFormatter(string $mime)
+ {
+ if (! array_key_exists($mime, $this->formatters))
+ {
+ throw new \InvalidArgumentException('No Formatter defined for mime type: '. $mime);
+ }
- $class = $this->formatters[$mime];
+ $class = $this->formatters[$mime];
- if (! class_exists($class))
- {
- throw new \BadMethodCallException($class.' is not a valid Formatter.');
- }
+ if (! class_exists($class))
+ {
+ throw new \BadMethodCallException($class.' is not a valid Formatter.');
+ }
- return new $class();
- }
+ return new $class();
+ }
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
}
diff --git a/application/Config/Images.php b/application/Config/Images.php
index c819ba29c205..826d969db34b 100644
--- a/application/Config/Images.php
+++ b/application/Config/Images.php
@@ -4,28 +4,28 @@
class Images extends BaseConfig
{
- /**
- * Default handler used if no other handler is specified.
- *
- * @var string
- */
- public $defaultHandler = 'gd';
+ /**
+ * Default handler used if no other handler is specified.
+ *
+ * @var string
+ */
+ public $defaultHandler = 'gd';
- /**
- * The path to the image library.
- * Required for ImageMagick, GraphicsMagick, or NetPBM.
- *
- * @var string
- */
- public $libraryPath = '/usr/local/bin/convert';
+ /**
+ * The path to the image library.
+ * Required for ImageMagick, GraphicsMagick, or NetPBM.
+ *
+ * @var string
+ */
+ public $libraryPath = '/usr/local/bin/convert';
- /**
- * The available handler classes.
- *
- * @var array
- */
- public $handlers = [
- 'gd' => \CodeIgniter\Images\Handlers\GDHandler::class,
- 'imagick' => \CodeIgniter\Images\Handlers\ImageMagickHandler::class,
- ];
+ /**
+ * The available handler classes.
+ *
+ * @var array
+ */
+ public $handlers = [
+ 'gd' => \CodeIgniter\Images\Handlers\GDHandler::class,
+ 'imagick' => \CodeIgniter\Images\Handlers\ImageMagickHandler::class,
+ ];
}
diff --git a/application/Config/Logger.php b/application/Config/Logger.php
index 5a71085b2156..035c6b0c7fad 100644
--- a/application/Config/Logger.php
+++ b/application/Config/Logger.php
@@ -4,130 +4,130 @@
class Logger extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Error Logging Threshold
- |--------------------------------------------------------------------------
- |
- | You can enable error logging by setting a threshold over zero. The
- | threshold determines what gets logged. Any values below or equal to the
- | threshold will be logged. Threshold options are:
- |
- | 0 = Disables logging, Error logging TURNED OFF
- | 1 = Emergency Messages - System is unusable
- | 2 = Alert Messages - Action Must Be Taken Immediately
- | 3 = Critical Messages - Application component unavailable, unexpected exception.
- | 4 = Runtime Errors - Don't need immediate action, but should be monitored.
- | 5 = Debug - Detailed debug information.
- | 6 = Warnings - Exceptional occurrences that are not errors.
- | 7 = Notices - Normal but significant events.
- | 8 = Info - Interesting events, like user logging in, etc.
- | 9 = All Messages
- |
- | You can also pass an array with threshold levels to show individual error types
- |
- | array(1, 2, 3, 5) = Emergency, Alert, Critical, and Debug messages
- |
- | For a live site you'll usually enable Critical or higher (3) to be logged otherwise
- | your log files will fill up very fast.
- |
- */
- public $threshold = 3;
+ /*
+ |--------------------------------------------------------------------------
+ | Error Logging Threshold
+ |--------------------------------------------------------------------------
+ |
+ | You can enable error logging by setting a threshold over zero. The
+ | threshold determines what gets logged. Any values below or equal to the
+ | threshold will be logged. Threshold options are:
+ |
+ | 0 = Disables logging, Error logging TURNED OFF
+ | 1 = Emergency Messages - System is unusable
+ | 2 = Alert Messages - Action Must Be Taken Immediately
+ | 3 = Critical Messages - Application component unavailable, unexpected exception.
+ | 4 = Runtime Errors - Don't need immediate action, but should be monitored.
+ | 5 = Debug - Detailed debug information.
+ | 6 = Warnings - Exceptional occurrences that are not errors.
+ | 7 = Notices - Normal but significant events.
+ | 8 = Info - Interesting events, like user logging in, etc.
+ | 9 = All Messages
+ |
+ | You can also pass an array with threshold levels to show individual error types
+ |
+ | array(1, 2, 3, 5) = Emergency, Alert, Critical, and Debug messages
+ |
+ | For a live site you'll usually enable Critical or higher (3) to be logged otherwise
+ | your log files will fill up very fast.
+ |
+ */
+ public $threshold = 3;
- /*
- |--------------------------------------------------------------------------
- | Error Logging Directory Path
- |--------------------------------------------------------------------------
- |
- |
- |
- */
- public $path = '';
+ /*
+ |--------------------------------------------------------------------------
+ | Error Logging Directory Path
+ |--------------------------------------------------------------------------
+ |
+ |
+ |
+ */
+ public $path = '';
- /*
- |--------------------------------------------------------------------------
- | Date Format for Logs
- |--------------------------------------------------------------------------
- |
- | Each item that is logged has an associated date. You can use PHP date
- | codes to set your own date formatting
- |
- */
- public $dateFormat = 'Y-m-d H:i:s';
+ /*
+ |--------------------------------------------------------------------------
+ | Date Format for Logs
+ |--------------------------------------------------------------------------
+ |
+ | Each item that is logged has an associated date. You can use PHP date
+ | codes to set your own date formatting
+ |
+ */
+ public $dateFormat = 'Y-m-d H:i:s';
- /*
- |--------------------------------------------------------------------------
- | Log Handlers
- |--------------------------------------------------------------------------
- |
- | The logging system supports multiple actions to be taken when something
- | is logged. This is done by allowing for multiple Handlers, special classes
- | designed to write the log to their chosen destinations, whether that is
- | a file on the getServer, a cloud-based service, or even taking actions such
- | as emailing the dev team.
- |
- | Each handler is defined by the class name used for that handler, and it
- | MUST implement the CodeIgniter\Log\Handlers\HandlerInterface interface.
- |
- | The value of each key is an array of configuration items that are sent
- | to the constructor of each handler. The only required configuration item
- | is the 'handles' element, which must be an array of integer log levels.
- | This is most easily handled by using the constants defined in the
- | Psr\Log\LogLevel class.
- |
- | Handlers are executed in the order defined in this array, starting with
- | the handler on top and continuing down.
- |
- */
- public $handlers = [
+ /*
+ |--------------------------------------------------------------------------
+ | Log Handlers
+ |--------------------------------------------------------------------------
+ |
+ | The logging system supports multiple actions to be taken when something
+ | is logged. This is done by allowing for multiple Handlers, special classes
+ | designed to write the log to their chosen destinations, whether that is
+ | a file on the getServer, a cloud-based service, or even taking actions such
+ | as emailing the dev team.
+ |
+ | Each handler is defined by the class name used for that handler, and it
+ | MUST implement the CodeIgniter\Log\Handlers\HandlerInterface interface.
+ |
+ | The value of each key is an array of configuration items that are sent
+ | to the constructor of each handler. The only required configuration item
+ | is the 'handles' element, which must be an array of integer log levels.
+ | This is most easily handled by using the constants defined in the
+ | Psr\Log\LogLevel class.
+ |
+ | Handlers are executed in the order defined in this array, starting with
+ | the handler on top and continuing down.
+ |
+ */
+ public $handlers = [
- //--------------------------------------------------------------------
- // File Handler
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
+ // File Handler
+ //--------------------------------------------------------------------
- 'CodeIgniter\Log\Handlers\FileHandler' => [
+ 'CodeIgniter\Log\Handlers\FileHandler' => [
- /*
- * The log levels that this handler will handle.
- */
- 'handles' => ['critical', 'alert', 'emergency', 'debug',
- 'error', 'info', 'notice', 'warning'],
+ /*
+ * The log levels that this handler will handle.
+ */
+ 'handles' => ['critical', 'alert', 'emergency', 'debug',
+ 'error', 'info', 'notice', 'warning'],
- /*
- * Leave this BLANK unless you would like to set something other than the default
- * writeable/logs/ directory. Use a full getServer path with trailing slash.
- */
- 'path' => WRITEPATH.'logs/',
+ /*
+ * Leave this BLANK unless you would like to set something other than the default
+ * writeable/logs/ directory. Use a full getServer path with trailing slash.
+ */
+ 'path' => WRITEPATH.'logs/',
- /*
- * The default filename extension for log files. The default 'php' allows for
- * protecting the log files via basic scripting, when they are to be stored
- * under a publicly accessible directory.
- *
- * Note: Leaving it blank will default to 'php'.
- */
- 'fileExtension' => 'php',
+ /*
+ * The default filename extension for log files. The default 'php' allows for
+ * protecting the log files via basic scripting, when they are to be stored
+ * under a publicly accessible directory.
+ *
+ * Note: Leaving it blank will default to 'php'.
+ */
+ 'fileExtension' => 'php',
- /*
- * The file system permissions to be applied on newly created log files.
- *
- * IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
- * integer notation (i.e. 0700, 0644, etc.)
- */
- 'filePermissions' => 0644
- ],
+ /*
+ * The file system permissions to be applied on newly created log files.
+ *
+ * IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
+ * integer notation (i.e. 0700, 0644, etc.)
+ */
+ 'filePermissions' => 0644
+ ],
- /**
- * The ChromeLoggerHandler requires the use of the Chrome web browser
- * and the ChromeLogger extension. Uncomment this block to use it.
- */
-// 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
-// /*
-// * The log levels that this handler will handle.
-// */
-// 'handles' => ['critical', 'alert', 'emergency', 'debug',
-// 'error', 'info', 'notice', 'warning'],
-// ]
- ];
+ /**
+ * The ChromeLoggerHandler requires the use of the Chrome web browser
+ * and the ChromeLogger extension. Uncomment this block to use it.
+ */
+// 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
+// /*
+// * The log levels that this handler will handle.
+// */
+// 'handles' => ['critical', 'alert', 'emergency', 'debug',
+// 'error', 'info', 'notice', 'warning'],
+// ]
+ ];
}
diff --git a/application/Config/Migrations.php b/application/Config/Migrations.php
index c746a22cba1b..d763e8dd8e0f 100644
--- a/application/Config/Migrations.php
+++ b/application/Config/Migrations.php
@@ -4,60 +4,60 @@
class Migrations extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Enable/Disable Migrations
- |--------------------------------------------------------------------------
- |
- | Migrations are disabled by default for security reasons.
- | You should enable migrations whenever you intend to do a schema migration
- | and disable it back when you're done.
- |
- */
- public $enabled = false;
+ /*
+ |--------------------------------------------------------------------------
+ | Enable/Disable Migrations
+ |--------------------------------------------------------------------------
+ |
+ | Migrations are disabled by default for security reasons.
+ | You should enable migrations whenever you intend to do a schema migration
+ | and disable it back when you're done.
+ |
+ */
+ public $enabled = false;
- /*
- |--------------------------------------------------------------------------
- | Migration Type
- |--------------------------------------------------------------------------
- |
- | Migration file names may be based on a sequential identifier or on
- | a timestamp. Options are:
- |
- | 'sequential' = Sequential migration naming (001_add_blog.php)
- | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
- | Use timestamp format YYYYMMDDHHIISS.
- |
- | Note: If this configuration value is missing the Migration library
- | defaults to 'sequential' for backward compatibility with CI2.
- |
- */
- public $type = 'timestamp';
+ /*
+ |--------------------------------------------------------------------------
+ | Migration Type
+ |--------------------------------------------------------------------------
+ |
+ | Migration file names may be based on a sequential identifier or on
+ | a timestamp. Options are:
+ |
+ | 'sequential' = Sequential migration naming (001_add_blog.php)
+ | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
+ | Use timestamp format YYYYMMDDHHIISS.
+ |
+ | Note: If this configuration value is missing the Migration library
+ | defaults to 'sequential' for backward compatibility with CI2.
+ |
+ */
+ public $type = 'timestamp';
- /*
- |--------------------------------------------------------------------------
- | Migrations table
- |--------------------------------------------------------------------------
- |
- | This is the name of the table that will store the current migrations state.
- | When migrations runs it will store in a database table which migration
- | level the system is at. It then compares the migration level in this
- | table to the $config['migration_version'] if they are not the same it
- | will migrate up. This must be set.
- |
- */
- public $table = 'migrations';
+ /*
+ |--------------------------------------------------------------------------
+ | Migrations table
+ |--------------------------------------------------------------------------
+ |
+ | This is the name of the table that will store the current migrations state.
+ | When migrations runs it will store in a database table which migration
+ | level the system is at. It then compares the migration level in this
+ | table to the $config['migration_version'] if they are not the same it
+ | will migrate up. This must be set.
+ |
+ */
+ public $table = 'migrations';
- /*
- |--------------------------------------------------------------------------
- | Migrations version
- |--------------------------------------------------------------------------
- |
- | This is used to set migration version that the file system should be on.
- | If you run $this->migration->current() this is the version that schema will
- | be upgraded / downgraded to.
- |
- */
- public $currentVersion = 0;
+ /*
+ |--------------------------------------------------------------------------
+ | Migrations version
+ |--------------------------------------------------------------------------
+ |
+ | This is used to set migration version that the file system should be on.
+ | If you run $this->migration->current() this is the version that schema will
+ | be upgraded / downgraded to.
+ |
+ */
+ public $currentVersion = 0;
}
diff --git a/application/Config/Mimes.php b/application/Config/Mimes.php
index 25a9224f035c..f8029bf1d7ba 100644
--- a/application/Config/Mimes.php
+++ b/application/Config/Mimes.php
@@ -15,316 +15,316 @@
*/
class Mimes
{
- /**
- * Map of extensions to mime types.
- *
- * @var array
- */
- public static $mimes = [
- 'hqx' => [
- 'application/mac-binhex40',
- 'application/mac-binhex',
- 'application/x-binhex40',
- 'application/x-mac-binhex40',
- ],
- 'cpt' => 'application/mac-compactpro',
- 'csv' => [
- 'text/csv',
- 'text/x-comma-separated-values',
- 'text/comma-separated-values',
- 'application/octet-stream',
- 'application/vnd.ms-excel',
- 'application/x-csv',
- 'text/x-csv',
- 'application/csv',
- 'application/excel',
- 'application/vnd.msexcel',
- 'text/plain',
- ],
- 'bin' => [
- 'application/macbinary',
- 'application/mac-binary',
- 'application/octet-stream',
- 'application/x-binary',
- 'application/x-macbinary',
- ],
- 'dms' => 'application/octet-stream',
- 'lha' => 'application/octet-stream',
- 'lzh' => 'application/octet-stream',
- 'exe' => ['application/octet-stream', 'application/x-msdownload'],
- 'class' => 'application/octet-stream',
- 'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
- 'so' => 'application/octet-stream',
- 'sea' => 'application/octet-stream',
- 'dll' => 'application/octet-stream',
- 'oda' => 'application/oda',
- 'pdf' => ['application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'],
- 'ai' => ['application/pdf', 'application/postscript'],
- 'eps' => 'application/postscript',
- 'ps' => 'application/postscript',
- 'smi' => 'application/smil',
- 'smil' => 'application/smil',
- 'mif' => 'application/vnd.mif',
- 'xls' => [
- 'application/vnd.ms-excel',
- 'application/msexcel',
- 'application/x-msexcel',
- 'application/x-ms-excel',
- 'application/x-excel',
- 'application/x-dos_ms_excel',
- 'application/xls',
- 'application/x-xls',
- 'application/excel',
- 'application/download',
- 'application/vnd.ms-office',
- 'application/msword',
- ],
- 'ppt' => [
- 'application/vnd.ms-powerpoint',
- 'application/powerpoint',
- 'application/vnd.ms-office',
- 'application/msword',
- ],
- 'pptx' => [
- 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'application/x-zip',
- 'application/zip',
- ],
- 'wbxml' => 'application/wbxml',
- 'wmlc' => 'application/wmlc',
- 'dcr' => 'application/x-director',
- 'dir' => 'application/x-director',
- 'dxr' => 'application/x-director',
- 'dvi' => 'application/x-dvi',
- 'gtar' => 'application/x-gtar',
- 'gz' => 'application/x-gzip',
- 'gzip' => 'application/x-gzip',
- 'php' => [
- 'application/x-php',
- 'application/x-httpd-php',
- 'application/php',
- 'text/php',
- 'text/x-php',
- 'application/x-httpd-php-source',
- ],
- 'php4' => 'application/x-httpd-php',
- 'php3' => 'application/x-httpd-php',
- 'phtml' => 'application/x-httpd-php',
- 'phps' => 'application/x-httpd-php-source',
- 'js' => ['application/x-javascript', 'text/plain'],
- 'swf' => 'application/x-shockwave-flash',
- 'sit' => 'application/x-stuffit',
- 'tar' => 'application/x-tar',
- 'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
- 'z' => 'application/x-compress',
- 'xhtml' => 'application/xhtml+xml',
- 'xht' => 'application/xhtml+xml',
- 'zip' => [
- 'application/x-zip',
- 'application/zip',
- 'application/x-zip-compressed',
- 'application/s-compressed',
- 'multipart/x-zip',
- ],
- 'rar' => ['application/x-rar', 'application/rar', 'application/x-rar-compressed'],
- 'mid' => 'audio/midi',
- 'midi' => 'audio/midi',
- 'mpga' => 'audio/mpeg',
- 'mp2' => 'audio/mpeg',
- 'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'],
- 'aif' => ['audio/x-aiff', 'audio/aiff'],
- 'aiff' => ['audio/x-aiff', 'audio/aiff'],
- 'aifc' => 'audio/x-aiff',
- 'ram' => 'audio/x-pn-realaudio',
- 'rm' => 'audio/x-pn-realaudio',
- 'rpm' => 'audio/x-pn-realaudio-plugin',
- 'ra' => 'audio/x-realaudio',
- 'rv' => 'video/vnd.rn-realvideo',
- 'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
- 'bmp' => [
- 'image/bmp',
- 'image/x-bmp',
- 'image/x-bitmap',
- 'image/x-xbitmap',
- 'image/x-win-bitmap',
- 'image/x-windows-bmp',
- 'image/ms-bmp',
- 'image/x-ms-bmp',
- 'application/bmp',
- 'application/x-bmp',
- 'application/x-win-bitmap',
- ],
- 'gif' => 'image/gif',
- 'jpg' => ['image/jpeg', 'image/pjpeg'],
- 'jpeg' => ['image/jpeg', 'image/pjpeg'],
- 'jpe' => ['image/jpeg', 'image/pjpeg'],
- 'jp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'j2k' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'jpf' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'jpg2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'jpx' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'jpm' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'mj2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'mjp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
- 'png' => ['image/png', 'image/x-png'],
- 'tif' => 'image/tiff',
- 'tiff' => 'image/tiff',
- 'css' => ['text/css', 'text/plain'],
- 'html' => ['text/html', 'text/plain'],
- 'htm' => ['text/html', 'text/plain'],
- 'shtml' => ['text/html', 'text/plain'],
- 'txt' => 'text/plain',
- 'text' => 'text/plain',
- 'log' => ['text/plain', 'text/x-log'],
- 'rtx' => 'text/richtext',
- 'rtf' => 'text/rtf',
- 'xml' => ['application/xml', 'text/xml', 'text/plain'],
- 'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
- 'mpeg' => 'video/mpeg',
- 'mpg' => 'video/mpeg',
- 'mpe' => 'video/mpeg',
- 'qt' => 'video/quicktime',
- 'mov' => 'video/quicktime',
- 'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'],
- 'movie' => 'video/x-sgi-movie',
- 'doc' => ['application/msword', 'application/vnd.ms-office'],
- 'docx' => [
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'application/zip',
- 'application/msword',
- 'application/x-zip',
- ],
- 'dot' => ['application/msword', 'application/vnd.ms-office'],
- 'dotx' => [
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'application/zip',
- 'application/msword',
- ],
- 'xlsx' => [
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'application/zip',
- 'application/vnd.ms-excel',
- 'application/msword',
- 'application/x-zip',
- ],
- 'word' => ['application/msword', 'application/octet-stream'],
- 'xl' => 'application/excel',
- 'eml' => 'message/rfc822',
- 'json' => ['application/json', 'text/json'],
- 'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'],
- 'p10' => ['application/x-pkcs10', 'application/pkcs10'],
- 'p12' => 'application/x-pkcs12',
- 'p7a' => 'application/x-pkcs7-signature',
- 'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
- 'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
- 'p7r' => 'application/x-pkcs7-certreqresp',
- 'p7s' => 'application/pkcs7-signature',
- 'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'],
- 'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
- 'der' => 'application/x-x509-ca-cert',
- 'kdb' => 'application/octet-stream',
- 'pgp' => 'application/pgp',
- 'gpg' => 'application/gpg-keys',
- 'sst' => 'application/octet-stream',
- 'csr' => 'application/octet-stream',
- 'rsa' => 'application/x-pkcs7',
- 'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
- '3g2' => 'video/3gpp2',
- '3gp' => ['video/3gp', 'video/3gpp'],
- 'mp4' => 'video/mp4',
- 'm4a' => 'audio/x-m4a',
- 'f4v' => ['video/mp4', 'video/x-f4v'],
- 'flv' => 'video/x-flv',
- 'webm' => 'video/webm',
- 'aac' => 'audio/x-acc',
- 'm4u' => 'application/vnd.mpegurl',
- 'm3u' => 'text/plain',
- 'xspf' => 'application/xspf+xml',
- 'vlc' => 'application/videolan',
- 'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
- 'au' => 'audio/x-au',
- 'ac3' => 'audio/ac3',
- 'flac' => 'audio/x-flac',
- 'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
- 'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'],
- 'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'],
- 'ics' => 'text/calendar',
- 'ical' => 'text/calendar',
- 'zsh' => 'text/x-scriptzsh',
- '7zip' => ['application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'],
- 'cdr' => [
- 'application/cdr',
- 'application/coreldraw',
- 'application/x-cdr',
- 'application/x-coreldraw',
- 'image/cdr',
- 'image/x-cdr',
- 'zz-application/zz-winassoc-cdr',
- ],
- 'wma' => ['audio/x-ms-wma', 'video/x-ms-asf'],
- 'jar' => [
- 'application/java-archive',
- 'application/x-java-application',
- 'application/x-jar',
- 'application/x-compressed',
- ],
- 'svg' => ['image/svg+xml', 'application/xml', 'text/xml'],
- 'vcf' => 'text/x-vcard',
- 'srt' => ['text/srt', 'text/plain'],
- 'vtt' => ['text/vtt', 'text/plain'],
- 'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
- ];
+ /**
+ * Map of extensions to mime types.
+ *
+ * @var array
+ */
+ public static $mimes = [
+ 'hqx' => [
+ 'application/mac-binhex40',
+ 'application/mac-binhex',
+ 'application/x-binhex40',
+ 'application/x-mac-binhex40',
+ ],
+ 'cpt' => 'application/mac-compactpro',
+ 'csv' => [
+ 'text/csv',
+ 'text/x-comma-separated-values',
+ 'text/comma-separated-values',
+ 'application/octet-stream',
+ 'application/vnd.ms-excel',
+ 'application/x-csv',
+ 'text/x-csv',
+ 'application/csv',
+ 'application/excel',
+ 'application/vnd.msexcel',
+ 'text/plain',
+ ],
+ 'bin' => [
+ 'application/macbinary',
+ 'application/mac-binary',
+ 'application/octet-stream',
+ 'application/x-binary',
+ 'application/x-macbinary',
+ ],
+ 'dms' => 'application/octet-stream',
+ 'lha' => 'application/octet-stream',
+ 'lzh' => 'application/octet-stream',
+ 'exe' => ['application/octet-stream', 'application/x-msdownload'],
+ 'class' => 'application/octet-stream',
+ 'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
+ 'so' => 'application/octet-stream',
+ 'sea' => 'application/octet-stream',
+ 'dll' => 'application/octet-stream',
+ 'oda' => 'application/oda',
+ 'pdf' => ['application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'],
+ 'ai' => ['application/pdf', 'application/postscript'],
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'mif' => 'application/vnd.mif',
+ 'xls' => [
+ 'application/vnd.ms-excel',
+ 'application/msexcel',
+ 'application/x-msexcel',
+ 'application/x-ms-excel',
+ 'application/x-excel',
+ 'application/x-dos_ms_excel',
+ 'application/xls',
+ 'application/x-xls',
+ 'application/excel',
+ 'application/download',
+ 'application/vnd.ms-office',
+ 'application/msword',
+ ],
+ 'ppt' => [
+ 'application/vnd.ms-powerpoint',
+ 'application/powerpoint',
+ 'application/vnd.ms-office',
+ 'application/msword',
+ ],
+ 'pptx' => [
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'application/x-zip',
+ 'application/zip',
+ ],
+ 'wbxml' => 'application/wbxml',
+ 'wmlc' => 'application/wmlc',
+ 'dcr' => 'application/x-director',
+ 'dir' => 'application/x-director',
+ 'dxr' => 'application/x-director',
+ 'dvi' => 'application/x-dvi',
+ 'gtar' => 'application/x-gtar',
+ 'gz' => 'application/x-gzip',
+ 'gzip' => 'application/x-gzip',
+ 'php' => [
+ 'application/x-php',
+ 'application/x-httpd-php',
+ 'application/php',
+ 'text/php',
+ 'text/x-php',
+ 'application/x-httpd-php-source',
+ ],
+ 'php4' => 'application/x-httpd-php',
+ 'php3' => 'application/x-httpd-php',
+ 'phtml' => 'application/x-httpd-php',
+ 'phps' => 'application/x-httpd-php-source',
+ 'js' => ['application/x-javascript', 'text/plain'],
+ 'swf' => 'application/x-shockwave-flash',
+ 'sit' => 'application/x-stuffit',
+ 'tar' => 'application/x-tar',
+ 'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
+ 'z' => 'application/x-compress',
+ 'xhtml' => 'application/xhtml+xml',
+ 'xht' => 'application/xhtml+xml',
+ 'zip' => [
+ 'application/x-zip',
+ 'application/zip',
+ 'application/x-zip-compressed',
+ 'application/s-compressed',
+ 'multipart/x-zip',
+ ],
+ 'rar' => ['application/x-rar', 'application/rar', 'application/x-rar-compressed'],
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mpga' => 'audio/mpeg',
+ 'mp2' => 'audio/mpeg',
+ 'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'],
+ 'aif' => ['audio/x-aiff', 'audio/aiff'],
+ 'aiff' => ['audio/x-aiff', 'audio/aiff'],
+ 'aifc' => 'audio/x-aiff',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'ra' => 'audio/x-realaudio',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
+ 'bmp' => [
+ 'image/bmp',
+ 'image/x-bmp',
+ 'image/x-bitmap',
+ 'image/x-xbitmap',
+ 'image/x-win-bitmap',
+ 'image/x-windows-bmp',
+ 'image/ms-bmp',
+ 'image/x-ms-bmp',
+ 'application/bmp',
+ 'application/x-bmp',
+ 'application/x-win-bitmap',
+ ],
+ 'gif' => 'image/gif',
+ 'jpg' => ['image/jpeg', 'image/pjpeg'],
+ 'jpeg' => ['image/jpeg', 'image/pjpeg'],
+ 'jpe' => ['image/jpeg', 'image/pjpeg'],
+ 'jp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'j2k' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'jpf' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'jpg2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'jpx' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'jpm' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'mj2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'mjp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
+ 'png' => ['image/png', 'image/x-png'],
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'css' => ['text/css', 'text/plain'],
+ 'html' => ['text/html', 'text/plain'],
+ 'htm' => ['text/html', 'text/plain'],
+ 'shtml' => ['text/html', 'text/plain'],
+ 'txt' => 'text/plain',
+ 'text' => 'text/plain',
+ 'log' => ['text/plain', 'text/x-log'],
+ 'rtx' => 'text/richtext',
+ 'rtf' => 'text/rtf',
+ 'xml' => ['application/xml', 'text/xml', 'text/plain'],
+ 'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
+ 'mpeg' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mpe' => 'video/mpeg',
+ 'qt' => 'video/quicktime',
+ 'mov' => 'video/quicktime',
+ 'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'],
+ 'movie' => 'video/x-sgi-movie',
+ 'doc' => ['application/msword', 'application/vnd.ms-office'],
+ 'docx' => [
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'application/zip',
+ 'application/msword',
+ 'application/x-zip',
+ ],
+ 'dot' => ['application/msword', 'application/vnd.ms-office'],
+ 'dotx' => [
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'application/zip',
+ 'application/msword',
+ ],
+ 'xlsx' => [
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'application/zip',
+ 'application/vnd.ms-excel',
+ 'application/msword',
+ 'application/x-zip',
+ ],
+ 'word' => ['application/msword', 'application/octet-stream'],
+ 'xl' => 'application/excel',
+ 'eml' => 'message/rfc822',
+ 'json' => ['application/json', 'text/json'],
+ 'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'],
+ 'p10' => ['application/x-pkcs10', 'application/pkcs10'],
+ 'p12' => 'application/x-pkcs12',
+ 'p7a' => 'application/x-pkcs7-signature',
+ 'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
+ 'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
+ 'p7r' => 'application/x-pkcs7-certreqresp',
+ 'p7s' => 'application/pkcs7-signature',
+ 'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'],
+ 'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
+ 'der' => 'application/x-x509-ca-cert',
+ 'kdb' => 'application/octet-stream',
+ 'pgp' => 'application/pgp',
+ 'gpg' => 'application/gpg-keys',
+ 'sst' => 'application/octet-stream',
+ 'csr' => 'application/octet-stream',
+ 'rsa' => 'application/x-pkcs7',
+ 'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
+ '3g2' => 'video/3gpp2',
+ '3gp' => ['video/3gp', 'video/3gpp'],
+ 'mp4' => 'video/mp4',
+ 'm4a' => 'audio/x-m4a',
+ 'f4v' => ['video/mp4', 'video/x-f4v'],
+ 'flv' => 'video/x-flv',
+ 'webm' => 'video/webm',
+ 'aac' => 'audio/x-acc',
+ 'm4u' => 'application/vnd.mpegurl',
+ 'm3u' => 'text/plain',
+ 'xspf' => 'application/xspf+xml',
+ 'vlc' => 'application/videolan',
+ 'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
+ 'au' => 'audio/x-au',
+ 'ac3' => 'audio/ac3',
+ 'flac' => 'audio/x-flac',
+ 'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
+ 'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'],
+ 'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'],
+ 'ics' => 'text/calendar',
+ 'ical' => 'text/calendar',
+ 'zsh' => 'text/x-scriptzsh',
+ '7zip' => ['application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'],
+ 'cdr' => [
+ 'application/cdr',
+ 'application/coreldraw',
+ 'application/x-cdr',
+ 'application/x-coreldraw',
+ 'image/cdr',
+ 'image/x-cdr',
+ 'zz-application/zz-winassoc-cdr',
+ ],
+ 'wma' => ['audio/x-ms-wma', 'video/x-ms-asf'],
+ 'jar' => [
+ 'application/java-archive',
+ 'application/x-java-application',
+ 'application/x-jar',
+ 'application/x-compressed',
+ ],
+ 'svg' => ['image/svg+xml', 'application/xml', 'text/xml'],
+ 'vcf' => 'text/x-vcard',
+ 'srt' => ['text/srt', 'text/plain'],
+ 'vtt' => ['text/vtt', 'text/plain'],
+ 'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
+ ];
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
- /**
- * Attempts to determine the best mime type for the given file extension.
- *
- * @param string $extension
- *
- * @return string|null The mime type found, or none if unable to determine.
- */
- public static function guessTypeFromExtension(string $extension)
- {
- $extension = trim(strtolower($extension), '. ');
+ /**
+ * Attempts to determine the best mime type for the given file extension.
+ *
+ * @param string $extension
+ *
+ * @return string|null The mime type found, or none if unable to determine.
+ */
+ public static function guessTypeFromExtension(string $extension)
+ {
+ $extension = trim(strtolower($extension), '. ');
- if (! array_key_exists($extension, self::$mimes))
- {
- return null;
- }
+ if (! array_key_exists($extension, self::$mimes))
+ {
+ return null;
+ }
- return is_array(self::$mimes[$extension]) ? self::$mimes[$extension][0] : self::$mimes[$extension];
- }
+ return is_array(self::$mimes[$extension]) ? self::$mimes[$extension][0] : self::$mimes[$extension];
+ }
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
- /**
- * Attempts to determine the best file extension for a given mime type.
- *
- * @param string $type
- *
- * @return string|null The extension determined, or null if unable to match.
- */
- public static function guessExtensionFromType(string $type)
- {
- $type = trim(strtolower($type), '. ');
+ /**
+ * Attempts to determine the best file extension for a given mime type.
+ *
+ * @param string $type
+ *
+ * @return string|null The extension determined, or null if unable to match.
+ */
+ public static function guessExtensionFromType(string $type)
+ {
+ $type = trim(strtolower($type), '. ');
- foreach (self::$mimes as $ext => $types)
- {
- if (is_string($types) && $types == $type)
- {
- return $ext;
- }
- else if (is_array($types) && in_array($type, $types))
- {
- return $ext;
- }
- }
+ foreach (self::$mimes as $ext => $types)
+ {
+ if (is_string($types) && $types == $type)
+ {
+ return $ext;
+ }
+ else if (is_array($types) && in_array($type, $types))
+ {
+ return $ext;
+ }
+ }
- return null;
- }
+ return null;
+ }
- //--------------------------------------------------------------------
+ //--------------------------------------------------------------------
}
diff --git a/application/Config/Pager.php b/application/Config/Pager.php
index bfb8ec554e4b..4d4750986b34 100644
--- a/application/Config/Pager.php
+++ b/application/Config/Pager.php
@@ -4,31 +4,31 @@
class Pager extends BaseConfig
{
- /*
- |--------------------------------------------------------------------------
- | Templates
- |--------------------------------------------------------------------------
- |
- | Pagination links are rendered out using views to configure their
- | appearance. This array contains aliases and the view names to
- | use when rendering the links.
- |
- | Within each view, the Pager object will be available as $pager,
- | and the desired group as $pagerGroup;
- |
- */
- public $templates = [
- 'default_full' => 'CodeIgniter\Pager\Views\default_full',
- 'default_simple' => 'CodeIgniter\Pager\Views\default_simple'
- ];
+ /*
+ |--------------------------------------------------------------------------
+ | Templates
+ |--------------------------------------------------------------------------
+ |
+ | Pagination links are rendered out using views to configure their
+ | appearance. This array contains aliases and the view names to
+ | use when rendering the links.
+ |
+ | Within each view, the Pager object will be available as $pager,
+ | and the desired group as $pagerGroup;
+ |
+ */
+ public $templates = [
+ 'default_full' => 'CodeIgniter\Pager\Views\default_full',
+ 'default_simple' => 'CodeIgniter\Pager\Views\default_simple'
+ ];
- /*
- |--------------------------------------------------------------------------
- | Items Per Page
- |--------------------------------------------------------------------------
- |
- | The default number of results shown in a single page.
- |
- */
- public $perPage = 20;
+ /*
+ |--------------------------------------------------------------------------
+ | Items Per Page
+ |--------------------------------------------------------------------------
+ |
+ | The default number of results shown in a single page.
+ |
+ */
+ public $perPage = 20;
}
diff --git a/application/Config/Paths.php b/application/Config/Paths.php
index c58f91a1adf2..cbfe72d705f4 100644
--- a/application/Config/Paths.php
+++ b/application/Config/Paths.php
@@ -10,69 +10,69 @@
*/
class Paths
{
- /*
- *---------------------------------------------------------------
- * SYSTEM FOLDER NAME
- *---------------------------------------------------------------
- *
- * This variable must contain the name of your "system" folder.
- * Include the path if the folder is not in the same directory
- * as this file.
- */
- public $systemDirectory = '../system';
+ /*
+ *---------------------------------------------------------------
+ * SYSTEM FOLDER NAME
+ *---------------------------------------------------------------
+ *
+ * This variable must contain the name of your "system" folder.
+ * Include the path if the folder is not in the same directory
+ * as this file.
+ */
+ public $systemDirectory = '../system';
- /*
- *---------------------------------------------------------------
- * APPLICATION FOLDER NAME
- *---------------------------------------------------------------
- *
- * If you want this front controller to use a different "application"
- * folder than the default one you can set its name here. The folder
- * can also be renamed or relocated anywhere on your getServer. If
- * you do, use a full getServer path. For more info please see the user guide:
- * http://codeigniter.com/user_guide/general/managing_apps.html
- *
- * NO TRAILING SLASH!
- */
- public $applicationDirectory = '../application';
+ /*
+ *---------------------------------------------------------------
+ * APPLICATION FOLDER NAME
+ *---------------------------------------------------------------
+ *
+ * If you want this front controller to use a different "application"
+ * folder than the default one you can set its name here. The folder
+ * can also be renamed or relocated anywhere on your getServer. If
+ * you do, use a full getServer path. For more info please see the user guide:
+ * http://codeigniter.com/user_guide/general/managing_apps.html
+ *
+ * NO TRAILING SLASH!
+ */
+ public $applicationDirectory = '../application';
- /*
- * ---------------------------------------------------------------
- * WRITABLE DIRECTORY NAME
- * ---------------------------------------------------------------
- *
- * This variable must contain the name of your "writable" directory.
- * The writable directory allows you to group all directories that
- * need write permission to a single place that can be tucked away
- * for maximum security, keeping it out of the application and/or
- * system directories.
- */
- public $writableDirectory = '../writable';
+ /*
+ * ---------------------------------------------------------------
+ * WRITABLE DIRECTORY NAME
+ * ---------------------------------------------------------------
+ *
+ * This variable must contain the name of your "writable" directory.
+ * The writable directory allows you to group all directories that
+ * need write permission to a single place that can be tucked away
+ * for maximum security, keeping it out of the application and/or
+ * system directories.
+ */
+ public $writableDirectory = '../writable';
- /*
- * ---------------------------------------------------------------
- * TESTS DIRECTORY NAME
- * ---------------------------------------------------------------
- *
- * This variable must contain the name of your "tests" directory.
- * The writable directory allows you to group all directories that
- * need write permission to a single place that can be tucked away
- * for maximum security, keeping it out of the application and/or
- * system directories.
- */
- public $testsDirectory = '../tests';
+ /*
+ * ---------------------------------------------------------------
+ * TESTS DIRECTORY NAME
+ * ---------------------------------------------------------------
+ *
+ * This variable must contain the name of your "tests" directory.
+ * The writable directory allows you to group all directories that
+ * need write permission to a single place that can be tucked away
+ * for maximum security, keeping it out of the application and/or
+ * system directories.
+ */
+ public $testsDirectory = '../tests';
- /*
- * ---------------------------------------------------------------
- * PUBLIC DIRECTORY NAME
- * ---------------------------------------------------------------
- *
- * This variable must contain the name of the directory that
- * contains the main index.php front-controller. By default,
- * this is the `public` directory, but some hosts may not
- * be able to map a primary domain to a sub-directory so you
- * can change this to `public_html`, for example, to comply
- * with your host's needs.
- */
- public $publicDirectory = 'public';
+ /*
+ * ---------------------------------------------------------------
+ * PUBLIC DIRECTORY NAME
+ * ---------------------------------------------------------------
+ *
+ * This variable must contain the name of the directory that
+ * contains the main index.php front-controller. By default,
+ * this is the `public` directory, but some hosts may not
+ * be able to map a primary domain to a sub-directory so you
+ * can change this to `public_html`, for example, to comply
+ * with your host's needs.
+ */
+ public $publicDirectory = 'public';
}
diff --git a/application/Config/Routes.php b/application/Config/Routes.php
index bbb60524799a..077553d87f0e 100644
--- a/application/Config/Routes.php
+++ b/application/Config/Routes.php
@@ -25,7 +25,7 @@
// can override as needed.
if (file_exists(BASEPATH.'Config/Routes.php'))
{
- require BASEPATH.'Config/Routes.php';
+ require BASEPATH.'Config/Routes.php';
}
/**
@@ -91,5 +91,5 @@
*/
if (file_exists(APPPATH.'Config/'.ENVIRONMENT.'/Routes.php'))
{
- require APPPATH.'Config/'.ENVIRONMENT.'/Routes.php';
+ require APPPATH.'Config/'.ENVIRONMENT.'/Routes.php';
}
diff --git a/application/Config/UserAgents.php b/application/Config/UserAgents.php
index f016a6e374d3..bec18c5e6952 100644
--- a/application/Config/UserAgents.php
+++ b/application/Config/UserAgents.php
@@ -4,216 +4,216 @@
class UserAgents extends BaseConfig
{
- /*
- | -------------------------------------------------------------------
- | USER AGENT TYPES
- | -------------------------------------------------------------------
- | This file contains four arrays of user agent data. It is used by the
- | User Agent Class to help identify browser, platform, robot, and
- | mobile device data. The array keys are used to identify the device
- | and the array values are used to set the actual name of the item.
- */
- public $platforms = [
- 'windows nt 10.0' => 'Windows 10',
- 'windows nt 6.3' => 'Windows 8.1',
- 'windows nt 6.2' => 'Windows 8',
- 'windows nt 6.1' => 'Windows 7',
- 'windows nt 6.0' => 'Windows Vista',
- 'windows nt 5.2' => 'Windows 2003',
- 'windows nt 5.1' => 'Windows XP',
- 'windows nt 5.0' => 'Windows 2000',
- 'windows nt 4.0' => 'Windows NT 4.0',
- 'winnt4.0' => 'Windows NT 4.0',
- 'winnt 4.0' => 'Windows NT',
- 'winnt' => 'Windows NT',
- 'windows 98' => 'Windows 98',
- 'win98' => 'Windows 98',
- 'windows 95' => 'Windows 95',
- 'win95' => 'Windows 95',
- 'windows phone' => 'Windows Phone',
- 'windows' => 'Unknown Windows OS',
- 'android' => 'Android',
- 'blackberry' => 'BlackBerry',
- 'iphone' => 'iOS',
- 'ipad' => 'iOS',
- 'ipod' => 'iOS',
- 'os x' => 'Mac OS X',
- 'ppc mac' => 'Power PC Mac',
- 'freebsd' => 'FreeBSD',
- 'ppc' => 'Macintosh',
- 'linux' => 'Linux',
- 'debian' => 'Debian',
- 'sunos' => 'Sun Solaris',
- 'beos' => 'BeOS',
- 'apachebench' => 'ApacheBench',
- 'aix' => 'AIX',
- 'irix' => 'Irix',
- 'osf' => 'DEC OSF',
- 'hp-ux' => 'HP-UX',
- 'netbsd' => 'NetBSD',
- 'bsdi' => 'BSDi',
- 'openbsd' => 'OpenBSD',
- 'gnu' => 'GNU/Linux',
- 'unix' => 'Unknown Unix OS',
- 'symbian' => 'Symbian OS',
- ];
+ /*
+ | -------------------------------------------------------------------
+ | USER AGENT TYPES
+ | -------------------------------------------------------------------
+ | This file contains four arrays of user agent data. It is used by the
+ | User Agent Class to help identify browser, platform, robot, and
+ | mobile device data. The array keys are used to identify the device
+ | and the array values are used to set the actual name of the item.
+ */
+ public $platforms = [
+ 'windows nt 10.0' => 'Windows 10',
+ 'windows nt 6.3' => 'Windows 8.1',
+ 'windows nt 6.2' => 'Windows 8',
+ 'windows nt 6.1' => 'Windows 7',
+ 'windows nt 6.0' => 'Windows Vista',
+ 'windows nt 5.2' => 'Windows 2003',
+ 'windows nt 5.1' => 'Windows XP',
+ 'windows nt 5.0' => 'Windows 2000',
+ 'windows nt 4.0' => 'Windows NT 4.0',
+ 'winnt4.0' => 'Windows NT 4.0',
+ 'winnt 4.0' => 'Windows NT',
+ 'winnt' => 'Windows NT',
+ 'windows 98' => 'Windows 98',
+ 'win98' => 'Windows 98',
+ 'windows 95' => 'Windows 95',
+ 'win95' => 'Windows 95',
+ 'windows phone' => 'Windows Phone',
+ 'windows' => 'Unknown Windows OS',
+ 'android' => 'Android',
+ 'blackberry' => 'BlackBerry',
+ 'iphone' => 'iOS',
+ 'ipad' => 'iOS',
+ 'ipod' => 'iOS',
+ 'os x' => 'Mac OS X',
+ 'ppc mac' => 'Power PC Mac',
+ 'freebsd' => 'FreeBSD',
+ 'ppc' => 'Macintosh',
+ 'linux' => 'Linux',
+ 'debian' => 'Debian',
+ 'sunos' => 'Sun Solaris',
+ 'beos' => 'BeOS',
+ 'apachebench' => 'ApacheBench',
+ 'aix' => 'AIX',
+ 'irix' => 'Irix',
+ 'osf' => 'DEC OSF',
+ 'hp-ux' => 'HP-UX',
+ 'netbsd' => 'NetBSD',
+ 'bsdi' => 'BSDi',
+ 'openbsd' => 'OpenBSD',
+ 'gnu' => 'GNU/Linux',
+ 'unix' => 'Unknown Unix OS',
+ 'symbian' => 'Symbian OS',
+ ];
- // The order of this array should NOT be changed. Many browsers return
- // multiple browser types so we want to identify the sub-type first.
- public $browsers = [
- 'OPR' => 'Opera',
- 'Flock' => 'Flock',
- 'Edge' => 'Spartan',
- 'Chrome' => 'Chrome',
- // Opera 10+ always reports Opera/9.80 and appends Version/MySQL
';
-
+
log_message('debug', 'MYSQL TEST');
-
+
$forge_mysql = \Config\Database::forge();
-
+
$forge_mysql->getConnection()->query('SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;');
-
+
$forge_mysql->dropTable('users', true);
-
+
$forge_mysql->getConnection()->query('SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;');
-
+
$forge_mysql->addField([
'id' => [
'type' => 'INTEGER',
@@ -52,7 +52,7 @@ public function forge()
$forge_mysql->addKey('id', true);
$attributes = array('ENGINE' => 'InnoDB');
$forge_mysql->createTable('users', true, $attributes);
-
+
$data_insert = array(
'id' => 1,
'name' => 'User 1',
@@ -60,7 +60,7 @@ public function forge()
$forge_mysql->getConnection()->table('users')->insert($data_insert);
$drop = $forge_mysql->dropTable('invoices', true);
-
+
$forge_mysql->addField([
'id' => [
'type' => 'INTEGER',
@@ -87,19 +87,19 @@ public function forge()
var_dump($forge_mysql->getConnection()->mysqli);
}else{
echo '
OK';
-
+
var_dump($forge_mysql->getConnection()->getForeignKeyData('invoices'));
}
-
+
$res = $forge_mysql->dropForeignKey('invoices','invoices_other_id_foreign');
-
-
+
+
echo 'PostgreSQL
';
-
+
$forge_pgsql = \Config\Database::forge('pgsql');
$forge_pgsql->dropTable('users',true, true);
-
+
$forge_pgsql->addField([
'id' => [
'type' => 'INTEGER',
@@ -113,14 +113,14 @@ public function forge()
]);
$forge_pgsql->addKey('id', true);
$forge_pgsql->createTable('users', true);
-
-
+
+
$data_insert = array(
'id' => 1,
'name' => 'User 1',
);
$forge_pgsql->getConnection()->table('users')->insert($data_insert);
-
+
$forge_pgsql->dropTable('invoices',true);
$forge_pgsql->addField([
'id' => [
@@ -143,7 +143,7 @@ public function forge()
]);
$forge_pgsql->addKey('id', true);
- $forge_pgsql->addForeignKey('users_id','users','id','CASCADE','CASCADE');
+ $forge_pgsql->addForeignKey('users_id','users','id','CASCADE','CASCADE');
$forge_pgsql->addForeignKey('other_id','users','id');
$res = $forge_pgsql->createTable('invoices', true);
@@ -154,134 +154,134 @@ public function forge()
echo '
OK';
var_dump($forge_pgsql->getConnection()->getForeignKeyData('invoices'));
}
-
+
//$res = $forge_pgsql->dropForeignKey('invoices','invoices_other_id_foreign');
-
+
}
- public function escape()
- {
- $db = Database::connect();
- $db->initialize();
-
- $jobs = $db->table('job')
- ->whereNotIn('name', ['Politician', 'Accountant'])
- ->get()
- ->getResult();
-
- die(var_dump($jobs));
- }
-
- public function password()
- {
- $db = Database::connect();
- $db->initialize();
-
- $result = $db->table('misc')
- ->insert([
- 'key' => 'password',
- 'value' => '$2y$10$ErQlCj/Mo10il.FthAm0WOjYdf3chZEGPFqaPzjqOX2aj2uYf5Ihq'
- ]);
-
- die(var_dump($result));
- }
-
-
- public function forms()
- {
- helper('form');
-
- var_dump(form_open());
- }
-
- public function api()
- {
- $data = [
- "total_users" => 3,
- "users" => [
- [
- "id" => 1,
- "name" => "Nitya",
- "address" => [
- "country" => "India",
- "city" => "Kolkata",
- "zip" => 700102,
- ]
- ],
- [
- "id" => 2,
- "name" => "John",
- "address" => [
- "country" => "USA",
- "city" => "Newyork",
- "zip" => "NY1234",
- ]
- ],
- [
- "id" => 3,
- "name" => "Viktor",
- "address" => [
- "country" => "Australia",
- "city" => "Sydney",
- "zip" => 123456,
- ]
- ],
- ]
- ];
-
- return $this->respond($data);
- }
-
- public function db()
- {
- $db = Database::connect();
- $db->initialize();
-
- $query = $db->prepare(function($db){
- return $db->table('user')->insert([
- 'name' => 'a',
- 'email' => 'b@example.com',
- 'country' => 'x'
- ]);
- });
-
- $query->execute('foo', 'foo@example.com', 'US');
- }
-
- public function db2()
- {
- $db = Database::connect();
- $db->initialize();
-
- $db->table('user')->insert([
- 'name' => 'a',
- 'email' => 'b@example.com',
- 'country' => 'x'
- ]);
- }
-
- public function format()
- {
- echo '';
- var_dump($this->response->getHeaderLine('content-type'));
- }
-
- public function model()
- {
- $model = new class() extends Model {
- protected $table = 'job';
+ public function escape()
+ {
+ $db = Database::connect();
+ $db->initialize();
+
+ $jobs = $db->table('job')
+ ->whereNotIn('name', ['Politician', 'Accountant'])
+ ->get()
+ ->getResult();
+
+ die(var_dump($jobs));
+ }
+
+ public function password()
+ {
+ $db = Database::connect();
+ $db->initialize();
+
+ $result = $db->table('misc')
+ ->insert([
+ 'key' => 'password',
+ 'value' => '$2y$10$ErQlCj/Mo10il.FthAm0WOjYdf3chZEGPFqaPzjqOX2aj2uYf5Ihq'
+ ]);
+
+ die(var_dump($result));
+ }
+
+
+ public function forms()
+ {
+ helper('form');
+
+ var_dump(form_open());
+ }
+
+ public function api()
+ {
+ $data = [
+ "total_users" => 3,
+ "users" => [
+ [
+ "id" => 1,
+ "name" => "Nitya",
+ "address" => [
+ "country" => "India",
+ "city" => "Kolkata",
+ "zip" => 700102,
+ ]
+ ],
+ [
+ "id" => 2,
+ "name" => "John",
+ "address" => [
+ "country" => "USA",
+ "city" => "Newyork",
+ "zip" => "NY1234",
+ ]
+ ],
+ [
+ "id" => 3,
+ "name" => "Viktor",
+ "address" => [
+ "country" => "Australia",
+ "city" => "Sydney",
+ "zip" => 123456,
+ ]
+ ],
+ ]
+ ];
+
+ return $this->respond($data);
+ }
+
+ public function db()
+ {
+ $db = Database::connect();
+ $db->initialize();
+
+ $query = $db->prepare(function($db){
+ return $db->table('user')->insert([
+ 'name' => 'a',
+ 'email' => 'b@example.com',
+ 'country' => 'x'
+ ]);
+ });
+
+ $query->execute('foo', 'foo@example.com', 'US');
+ }
+
+ public function db2()
+ {
+ $db = Database::connect();
+ $db->initialize();
+
+ $db->table('user')->insert([
+ 'name' => 'a',
+ 'email' => 'b@example.com',
+ 'country' => 'x'
+ ]);
+ }
+
+ public function format()
+ {
+ echo '';
+ var_dump($this->response->getHeaderLine('content-type'));
+ }
+
+ public function model()
+ {
+ $model = new class() extends Model {
+ protected $table = 'job';
};
- $results = $model->findAll();
+ $results = $model->findAll();
- $developer = $model->findWhere('name', 'Developer');
+ $developer = $model->findWhere('name', 'Developer');
- $politician = $model->find(3);
+ $politician = $model->find(3);
- dd($politician);
+ dd($politician);
- }
+ }
public function curl()
{
@@ -303,137 +303,137 @@ public function catch()
echo $body;
}
- public function redirect()
- {
- return redirect('/checks/model');
+ public function redirect()
+ {
+ return redirect('/checks/model');
+ }
+
+ public function image()
+ {
+ $info = Services::image('imagick')
+ ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
+ ->getFile()
+ ->getProperties(true);
+
+ dd(ENVIRONMENT);
+
+ $images = Services::image('imagick')
+ ->getVersion();
+// ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
+// ->resize(500, 100, true)
+// ->crop(200, 75, 20, 0, false)
+// ->rotate(90)
+// ->save('/Users/kilishan/temp.jpg');
+
+// $images = Services::image('imagick')
+// ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
+// ->fit(500, 100, 'bottom-left')
+// ->text('Bob is Back!', [
+// 'fontPath' => '/Users/kilishan/Downloads/Calibri.ttf',
+// 'fontSize' => 40,
+// 'padding' => 0,
+// 'opacity' => 0.5,
+// 'vAlign' => 'top',
+// 'hAlign' => 'right',
+// 'withShadow' => true,
+// ])
+// ->save('/Users/kilishan/temp.jpg', 100);
+
+
+ ddd($images);
+ }
+
+ public function time()
+ {
+ $time = new Time();
+
+ echo($time);
+ echo '
';
+ echo Time::now();
+ echo '
';
+ echo Time::parse('First Monday of December');
+ echo '
';
+
+ $time = new Time('Next Monday');
+ die($time);
}
- public function image()
- {
- $info = Services::image('imagick')
- ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
- ->getFile()
- ->getProperties(true);
-
- dd(ENVIRONMENT);
-
- $images = Services::image('imagick')
- ->getVersion();
-// ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
-// ->resize(500, 100, true)
-// ->crop(200, 75, 20, 0, false)
-// ->rotate(90)
-// ->save('/Users/kilishan/temp.jpg');
-
-// $images = Services::image('imagick')
-// ->withFile("/Users/kilishan/Documents/BobHeader.jpg")
-// ->fit(500, 100, 'bottom-left')
-// ->text('Bob is Back!', [
-// 'fontPath' => '/Users/kilishan/Downloads/Calibri.ttf',
-// 'fontSize' => 40,
-// 'padding' => 0,
-// 'opacity' => 0.5,
-// 'vAlign' => 'top',
-// 'hAlign' => 'right',
-// 'withShadow' => true,
-// ])
-// ->save('/Users/kilishan/temp.jpg', 100);
-
-
- ddd($images);
- }
-
- public function time()
- {
- $time = new Time();
-
- echo($time);
- echo '
';
- echo Time::now();
- echo '
';
- echo Time::parse('First Monday of December');
- echo '
';
-
- $time = new Time('Next Monday');
- die($time);
- }
-
- public function csp()
- {
-// $this->response->CSP->reportOnly(true);
- $this->response->CSP->setDefaultSrc(base_url());
- $this->response->CSP->addStyleSrc('unsafe-inline');
- $this->response->CSP->addStyleSrc('https://maxcdn.bootstrapcdn.com');
-
- echo <<
";
- echo "Temp Name: {$file->getTempName()}
";
- echo "Original Name: {$file->getClientName()}
";
- echo "Random Name: {$file->getRandomName()}
";
- echo "Extension: {$file->getExtension()}
";
- echo "Client Extension: {$file->getClientExtension()}
";
- echo "Guessed Extension: {$file->guessExtension()}
";
- echo "MimeType: {$file->getMimeType()}
";
- echo "IsValid: {$file->isValid()}
";
- echo "Size (b): {$file->getSize()}
";
- echo "Size (kb): {$file->getSize('kb')}
";
- echo "Size (mb): {$file->getSize('mb')}
";
- echo "Size (mb): {$file->getSize('mb')}
";
- echo "Path: {$file->getPath()}
";
- echo "RealPath: {$file->getRealPath()}
";
- echo "Filename: {$file->getFilename()}
";
- echo "Basename: {$file->getBasename()}
";
- echo "Pathname: {$file->getPathname()}
";
- echo "Permissions: {$file->getPerms()}
";
- echo "Inode: {$file->getInode()}
";
- echo "Owner: {$file->getOwner()}
";
- echo "Group: {$file->getGroup()}
";
- echo "ATime: {$file->getATime()}
";
- echo "MTime: {$file->getMTime()}
";
- echo "CTime: {$file->getCTime()}
";
-
- dd($file);
- }
-
- echo <<
";
+ echo "Temp Name: {$file->getTempName()}
";
+ echo "Original Name: {$file->getClientName()}
";
+ echo "Random Name: {$file->getRandomName()}
";
+ echo "Extension: {$file->getExtension()}
";
+ echo "Client Extension: {$file->getClientExtension()}
";
+ echo "Guessed Extension: {$file->guessExtension()}
";
+ echo "MimeType: {$file->getMimeType()}
";
+ echo "IsValid: {$file->isValid()}
";
+ echo "Size (b): {$file->getSize()}
";
+ echo "Size (kb): {$file->getSize('kb')}
";
+ echo "Size (mb): {$file->getSize('mb')}
";
+ echo "Size (mb): {$file->getSize('mb')}
";
+ echo "Path: {$file->getPath()}
";
+ echo "RealPath: {$file->getRealPath()}
";
+ echo "Filename: {$file->getFilename()}
";
+ echo "Basename: {$file->getBasename()}
";
+ echo "Pathname: {$file->getPathname()}
";
+ echo "Permissions: {$file->getPerms()}
";
+ echo "Inode: {$file->getInode()}
";
+ echo "Owner: {$file->getOwner()}
";
+ echo "Group: {$file->getGroup()}
";
+ echo "ATime: {$file->getATime()}
";
+ echo "MTime: {$file->getMTime()}
";
+ echo "CTime: {$file->getCTime()}
";
+
+ dd($file);
+ }
+
+ echo <<
- - = esc($message) ?> - - Sorry! Cannot seem to find the page you were looking for. - -
-+ + = esc($message) ?> + + Sorry! Cannot seem to find the page you were looking for. + +
+', - $response->getBody())); - } - - return $response->appendBody($script); - } - } - - //-------------------------------------------------------------------- + /** + * We don't need to do anything here. + * + * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request + * + * @return mixed + */ + public function before(RequestInterface $request) + { + + } + + //-------------------------------------------------------------------- + + /** + * If the debug flag is set (CI_DEBUG) then collect performance + * and debug information and display it in a toolbar. + * + * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request + * @param ResponseInterface|\CodeIgniter\HTTP\Response $response + * + * @return mixed + */ + public function after(RequestInterface $request, ResponseInterface $response) + { + if ( ! is_cli() && CI_DEBUG) + { + global $app; + + $toolbar = Services::toolbar(new App()); + $stats = $app->getPerformanceStats(); + $data = $toolbar->run( + $stats['startTime'], + $stats['totalTime'], + $stats['startMemory'], + $request, + $response + ); + + helper('filesystem'); + + // Updated to time() so we can get history + $time = time(); + + if (! is_dir(WRITEPATH.'debugbar')) + { + mkdir(WRITEPATH.'debugbar', 0777); + } + + write_file(WRITEPATH .'debugbar/'.'debugbar_' . $time, $data, 'w+'); + + $format = $response->getHeaderLine('content-type'); + + // Non-HTML formats should not include the debugbar + // then we send headers saying where to find the debug data + // for this response + if ($request->isAJAX() || strpos($format, 'html') === false) + { + return $response->setHeader('Debugbar-Time', (string)$time) + ->setHeader('Debugbar-Link', site_url("?debugbar_time={$time}")) + ->getBody(); + } + + $script = PHP_EOL + . '' + . PHP_EOL; + + if (strpos($response->getBody(), '') !== false) + { + return $response->setBody(str_replace('', $script . '', + $response->getBody())); + } + + return $response->appendBody($script); + } + } + + //-------------------------------------------------------------------- } diff --git a/application/Filters/Throttle.php b/application/Filters/Throttle.php index 02dda6032495..5cac7f9672ad 100644 --- a/application/Filters/Throttle.php +++ b/application/Filters/Throttle.php @@ -7,40 +7,40 @@ class Throttle implements FilterInterface { - /** - * This is a demo implementation of using the Throttler class - * to implement rate limiting for your application. - * - * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request - * - * @return mixed - */ - public function before(RequestInterface $request) - { - $throttler = Services::throttler(); + /** + * This is a demo implementation of using the Throttler class + * to implement rate limiting for your application. + * + * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request + * + * @return mixed + */ + public function before(RequestInterface $request) + { + $throttler = Services::throttler(); - // Restrict an IP address to no more - // than 1 request per second across the - // entire site. - if ($throttler->check($request->getIPAddress(), 60, MINUTE) === false) - { - return Services::response()->setStatusCode(429); - } - } + // Restrict an IP address to no more + // than 1 request per second across the + // entire site. + if ($throttler->check($request->getIPAddress(), 60, MINUTE) === false) + { + return Services::response()->setStatusCode(429); + } + } - //-------------------------------------------------------------------- + //-------------------------------------------------------------------- - /** - * We don't have anything to do here. - * - * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request - * @param ResponseInterface|\CodeIgniter\HTTP\Response $response - * - * @return mixed - */ - public function after(RequestInterface $request, ResponseInterface $response) - { - } + /** + * We don't have anything to do here. + * + * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request + * @param ResponseInterface|\CodeIgniter\HTTP\Response $response + * + * @return mixed + */ + public function after(RequestInterface $request, ResponseInterface $response) + { + } - //-------------------------------------------------------------------- + //-------------------------------------------------------------------- } diff --git a/application/Views/errors/cli/error_exception.php b/application/Views/errors/cli/error_exception.php index 43f3d6e42f7d..9f133efed8ff 100644 --- a/application/Views/errors/cli/error_exception.php +++ b/application/Views/errors/cli/error_exception.php @@ -9,11 +9,11 @@ - Backtrace: - getTrace() as $error): ?> - + Backtrace: + getTrace() as $error): ?> + = trim('-'. $error['line'] .' - '. $error['file'] .'::'. $error['function']) ."\n" ?> - - + + diff --git a/application/Views/errors/html/error_404.php b/application/Views/errors/html/error_404.php index 47f238c96339..bff6bcd71776 100644 --- a/application/Views/errors/html/error_404.php +++ b/application/Views/errors/html/error_404.php @@ -3,84 +3,84 @@ ?>
- -
+ +
-