diff --git a/app/.htaccess b/app/.htaccess index 6c63ed4c4..f24db0acc 100644 --- a/app/.htaccess +++ b/app/.htaccess @@ -3,4 +3,4 @@ Deny from all - \ No newline at end of file + diff --git a/app/Common.php b/app/Common.php index 780ba3f80..23e3e614a 100644 --- a/app/Common.php +++ b/app/Common.php @@ -4,12 +4,12 @@ * The goal of this file is to allow developers a location * where they can overwrite core procedural functions and * replace them with their own. This file is loaded during - * the bootstrap process and is called during the frameworks + * the bootstrap process and is called during the framework's * execution. * * This can be looked at as a `master helper` file that is * loaded early on, and may also contain additional functions * that you'd like to use throughout your entire application * - * @link: https://codeigniter4.github.io/CodeIgniter4/ + * @see: https://codeigniter4.github.io/CodeIgniter4/ */ diff --git a/app/Config/App.php b/app/Config/App.php index b6d95309c..e1fc9e219 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -3,6 +3,7 @@ namespace Config; use CodeIgniter\Config\BaseConfig; +use CodeIgniter\Session\Handlers\DatabaseHandler; class App extends BaseConfig { @@ -109,7 +110,7 @@ class App extends BaseConfig * * If false, no automatic detection will be performed. * - * @var boolean + * @var bool */ public $negotiateLocale = true; @@ -168,17 +169,17 @@ class App extends BaseConfig 'zh-Hant', ]; - /** - * -------------------------------------------------------------------------- - * 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() - * - * @var string - */ - public $appTimezone = 'Asia/Kathmandu'; + /** + * -------------------------------------------------------------------------- + * 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() + * + * @var string + */ + public $appTimezone = 'America/Chicago'; /** * -------------------------------------------------------------------------- @@ -204,7 +205,7 @@ class App extends BaseConfig * secure, the user will be redirected to a secure version of the page * and the HTTP Strict Transport Security header will be set. * - * @var boolean + * @var bool */ public $forceGlobalSecureRequests = true; @@ -221,7 +222,7 @@ class App extends BaseConfig * * @var string */ - public $sessionDriver = 'CodeIgniter\Session\Handlers\DatabaseHandler'; + public $sessionDriver = DatabaseHandler::class; /** * -------------------------------------------------------------------------- @@ -242,7 +243,7 @@ class App extends BaseConfig * The number of SECONDS you want the session to last. * Setting to 0 (zero) means expire when the browser is closed. * - * @var integer + * @var int */ public $sessionExpiration = 7200; @@ -275,243 +276,243 @@ class App extends BaseConfig * WARNING: If you're using the database driver, don't forget to update * your session table's PRIMARY KEY when changing this setting. * - * @var boolean + * @var bool */ public $sessionMatchIP = true; - /** - * -------------------------------------------------------------------------- - * Session Time to Update - * -------------------------------------------------------------------------- - * - * How many seconds between CI regenerating the session ID. - * - * @var integer - */ - public $sessionTimeToUpdate = 300; + /** + * -------------------------------------------------------------------------- + * Session Time to Update + * -------------------------------------------------------------------------- + * + * How many seconds between CI regenerating the session ID. + * + * @var int + */ + public $sessionTimeToUpdate = 300; - /** - * -------------------------------------------------------------------------- - * Session Regenerate Destroy - * -------------------------------------------------------------------------- - * - * 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. - * - * @var boolean - */ - public $sessionRegenerateDestroy = false; + /** + * -------------------------------------------------------------------------- + * Session Regenerate Destroy + * -------------------------------------------------------------------------- + * + * 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. + * + * @var bool + */ + public $sessionRegenerateDestroy = false; - /** - * -------------------------------------------------------------------------- - * Cookie Prefix - * -------------------------------------------------------------------------- - * - * Set a cookie name prefix if you need to avoid collisions. - * - * @var string - * - * @deprecated use Config\Cookie::$prefix property instead. - */ - public $cookiePrefix = ''; + /** + * -------------------------------------------------------------------------- + * Cookie Prefix + * -------------------------------------------------------------------------- + * + * Set a cookie name prefix if you need to avoid collisions. + * + * @var string + * + * @deprecated use Config\Cookie::$prefix property instead. + */ + public $cookiePrefix; - /** - * -------------------------------------------------------------------------- - * Cookie Domain - * -------------------------------------------------------------------------- - * - * Set to `.your-domain.com` for site-wide cookies. - * - * @var string - * - * @deprecated use Config\Cookie::$domain property instead. - */ - public $cookieDomain = ''; + /** + * -------------------------------------------------------------------------- + * Cookie Domain + * -------------------------------------------------------------------------- + * + * Set to `.your-domain.com` for site-wide cookies. + * + * @var string + * + * @deprecated use Config\Cookie::$domain property instead. + */ + public $cookieDomain; - /** - * -------------------------------------------------------------------------- - * Cookie Path - * -------------------------------------------------------------------------- - * - * Typically will be a forward slash. - * - * @var string - * - * @deprecated use Config\Cookie::$path property instead. - */ - public $cookiePath = '/'; + /** + * -------------------------------------------------------------------------- + * Cookie Path + * -------------------------------------------------------------------------- + * + * Typically will be a forward slash. + * + * @var string + * + * @deprecated use Config\Cookie::$path property instead. + */ + public $cookiePath; - /** - * -------------------------------------------------------------------------- - * Cookie Secure - * -------------------------------------------------------------------------- - * - * Cookie will only be set if a secure HTTPS connection exists. - * - * @var boolean - * - * @deprecated use Config\Cookie::$secure property instead. - */ - public $cookieSecure; + /** + * -------------------------------------------------------------------------- + * Cookie Secure + * -------------------------------------------------------------------------- + * + * Cookie will only be set if a secure HTTPS connection exists. + * + * @var bool + * + * @deprecated use Config\Cookie::$secure property instead. + */ + public $cookieSecure; - /** - * -------------------------------------------------------------------------- - * Cookie HttpOnly - * -------------------------------------------------------------------------- - * - * Cookie will only be accessible via HTTP(S) (no JavaScript). - * - * @var boolean - * - * @deprecated use Config\Cookie::$httponly property instead. - */ - public $cookieHTTPOnly = true; + /** + * -------------------------------------------------------------------------- + * Cookie HttpOnly + * -------------------------------------------------------------------------- + * + * Cookie will only be accessible via HTTP(S) (no JavaScript). + * + * @var bool + * + * @deprecated use Config\Cookie::$httponly property instead. + */ + public $cookieHTTPOnly; - /** - * -------------------------------------------------------------------------- - * Cookie SameSite - * -------------------------------------------------------------------------- - * - * Configure cookie SameSite setting. Allowed values are: - * - None - * - Lax - * - Strict - * - '' - * - * Alternatively, you can use the constant names: - * - `Cookie::SAMESITE_NONE` - * - `Cookie::SAMESITE_LAX` - * - `Cookie::SAMESITE_STRICT` - * - * Defaults to `Lax` for compatibility with modern browsers. Setting `''` - * (empty string) means default SameSite attribute set by browsers (`Lax`) - * will be set on cookies. If set to `None`, `$cookieSecure` must also be set. - * - * @var string - * - * @deprecated use Config\Cookie::$samesite property instead. - */ - public $cookieSameSite = 'Lax'; + /** + * -------------------------------------------------------------------------- + * Cookie SameSite + * -------------------------------------------------------------------------- + * + * Configure cookie SameSite setting. Allowed values are: + * - None + * - Lax + * - Strict + * - '' + * + * Alternatively, you can use the constant names: + * - `Cookie::SAMESITE_NONE` + * - `Cookie::SAMESITE_LAX` + * - `Cookie::SAMESITE_STRICT` + * + * Defaults to `Lax` for compatibility with modern browsers. Setting `''` + * (empty string) means default SameSite attribute set by browsers (`Lax`) + * will be set on cookies. If set to `None`, `$cookieSecure` must also be set. + * + * @var string|null + * + * @deprecated use Config\Cookie::$samesite property instead. + */ + public $cookieSameSite = 'Lax'; - /** - * -------------------------------------------------------------------------- - * Reverse Proxy IPs - * -------------------------------------------------------------------------- - * - * If your server 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: ['10.0.1.200', '192.168.5.0/24'] - * - * @var string|string[] - */ - public $proxyIPs = ''; + /** + * -------------------------------------------------------------------------- + * Reverse Proxy IPs + * -------------------------------------------------------------------------- + * + * If your server 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: ['10.0.1.200', '192.168.5.0/24'] + * + * @var string|string[] + */ + public $proxyIPs = ''; - /** - * -------------------------------------------------------------------------- - * CSRF Token Name - * -------------------------------------------------------------------------- - * - * The token name. - * - * @deprecated Use `Config\Security` $tokenName property instead of using this property. - * - * @var string - */ - public $CSRFTokenName; + /** + * -------------------------------------------------------------------------- + * CSRF Token Name + * -------------------------------------------------------------------------- + * + * The token name. + * + * @deprecated Use `Config\Security` $tokenName property instead of using this property. + * + * @var string + */ + public $CSRFTokenName; - /** - * -------------------------------------------------------------------------- - * CSRF Header Name - * -------------------------------------------------------------------------- - * - * The header name. - * - * @deprecated Use `Config\Security` $headerName property instead of using this property. - * - * @var string - */ - public $CSRFHeaderName = 'X-CSRF-TOKEN'; + /** + * -------------------------------------------------------------------------- + * CSRF Header Name + * -------------------------------------------------------------------------- + * + * The header name. + * + * @deprecated Use `Config\Security` $headerName property instead of using this property. + * + * @var string + */ + public $CSRFHeaderName = 'X-CSRF-TOKEN'; - /** - * -------------------------------------------------------------------------- - * CSRF Cookie Name - * -------------------------------------------------------------------------- - * - * The cookie name. - * - * @deprecated Use `Config\Security` $cookieName property instead of using this property. - * - * @var string - */ - public $CSRFCookieName; + /** + * -------------------------------------------------------------------------- + * CSRF Cookie Name + * -------------------------------------------------------------------------- + * + * The cookie name. + * + * @deprecated Use `Config\Security` $cookieName property instead of using this property. + * + * @var string + */ + public $CSRFCookieName; - /** - * -------------------------------------------------------------------------- - * CSRF Expire - * -------------------------------------------------------------------------- - * - * The number in seconds the token should expire. - * - * @deprecated Use `Config\Security` $expire property instead of using this property. - * - * @var integer - */ - public $CSRFExpire = 7200; + /** + * -------------------------------------------------------------------------- + * CSRF Expire + * -------------------------------------------------------------------------- + * + * The number in seconds the token should expire. + * + * @deprecated Use `Config\Security` $expire property instead of using this property. + * + * @var int + */ + public $CSRFExpire; - /** - * -------------------------------------------------------------------------- - * CSRF Regenerate - * -------------------------------------------------------------------------- - * - * Regenerate token on every submission? - * - * @deprecated Use `Config\Security` $regenerate property instead of using this property. - * - * @var boolean - */ - public $CSRFRegenerate = true; + /** + * -------------------------------------------------------------------------- + * CSRF Regenerate + * -------------------------------------------------------------------------- + * + * Regenerate token on every submission? + * + * @deprecated Use `Config\Security` $regenerate property instead of using this property. + * + * @var bool + */ + public $CSRFRegenerate; - /** - * -------------------------------------------------------------------------- - * CSRF Redirect - * -------------------------------------------------------------------------- - * - * Redirect to previous page with error on failure? - * - * @deprecated Use `Config\Security` $redirect property instead of using this property. - * - * @var boolean - */ - public $CSRFRedirect = true; + /** + * -------------------------------------------------------------------------- + * CSRF Redirect + * -------------------------------------------------------------------------- + * + * Redirect to previous page with error on failure? + * + * @deprecated Use `Config\Security` $redirect property instead of using this property. + * + * @var bool + */ + public $CSRFRedirect; - /** - * -------------------------------------------------------------------------- - * CSRF SameSite - * -------------------------------------------------------------------------- - * - * Setting for CSRF SameSite cookie token. Allowed values are: - * - None - * - Lax - * - Strict - * - '' - * - * Defaults to `Lax` as recommended in this link: - * - * @see https://portswigger.net/web-security/csrf/samesite-cookies - * - * @deprecated Use `Config\Security` $samesite property instead of using this property. - * - * @var string - */ - public $CSRFSameSite = 'Lax'; + /** + * -------------------------------------------------------------------------- + * CSRF SameSite + * -------------------------------------------------------------------------- + * + * Setting for CSRF SameSite cookie token. Allowed values are: + * - None + * - Lax + * - Strict + * - '' + * + * Defaults to `Lax` as recommended in this link: + * + * @see https://portswigger.net/web-security/csrf/samesite-cookies + * + * @deprecated `Config\Cookie` $samesite property is used. + * + * @var string + */ + public $CSRFSameSite; /** * -------------------------------------------------------------------------- @@ -529,7 +530,7 @@ class App extends BaseConfig * @see http://www.html5rocks.com/en/tutorials/security/content-security-policy/ * @see http://www.w3.org/TR/CSP/ * - * @var boolean + * @var bool */ public $CSPEnabled = false; diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index a6e894f13..9c009b568 100644 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -17,52 +17,54 @@ use CodeIgniter\Config\AutoloadConfig; */ class Autoload extends AutoloadConfig { - /** - * ------------------------------------------------------------------- - * 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 '/app' 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. - * - * Prototype: - *``` - * $psr4 = [ - * 'CodeIgniter' => SYSTEMPATH, - * 'App' => APPPATH - * ]; - *``` - * @var array - */ - public $psr4 = [ - APP_NAMESPACE => APPPATH, // For custom app namespace - 'Config' => APPPATH . 'Config', + /** + * ------------------------------------------------------------------- + * 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 '/app' 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. + * + * Prototype: + *``` + * $psr4 = [ + * 'CodeIgniter' => SYSTEMPATH, + * 'App' => APPPATH + * ]; + *``` + * + * @var array + */ + public $psr4 = [ + APP_NAMESPACE => APPPATH, // For custom app namespace + 'Config' => APPPATH . 'Config', 'dompdf' => APPPATH . 'ThirdParty/dompdf/src' - ]; + ]; - /** - * ------------------------------------------------------------------- - * 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: - *``` - * $classmap = [ - * 'MyClass' => '/path/to/class/file.php' - * ]; - *``` - * @var array - */ + /** + * ------------------------------------------------------------------- + * 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: + *``` + * $classmap = [ + * 'MyClass' => '/path/to/class/file.php' + * ]; + *``` + * + * @var array + */ public $classmap = [ //Controllers 'Attributes' => '/App/Controllers/Attributes.php', @@ -173,21 +175,22 @@ class Autoload extends AutoloadConfig 'Rounding_mode' => '/App/Models/Enums/Rounding_mode.php' ]; - /** - * ------------------------------------------------------------------- - * Files - * ------------------------------------------------------------------- - * The files array provides a list of paths to __non-class__ files - * that will be autoloaded. This can be useful for bootstrap operations - * or for loading functions. - * - * Prototype: - * ``` - * $files = [ - * '/path/to/my/file.php', - * ]; - * ``` - * @var array - */ - public $files = []; -} \ No newline at end of file + /** + * ------------------------------------------------------------------- + * Files + * ------------------------------------------------------------------- + * The files array provides a list of paths to __non-class__ files + * that will be autoloaded. This can be useful for bootstrap operations + * or for loading functions. + * + * Prototype: + * ``` + * $files = [ + * '/path/to/my/file.php', + * ]; + * ``` + * + * @var array + */ + public $files = []; +} diff --git a/app/Config/Cache.php b/app/Config/Cache.php index a785efe13..2d1fea90c 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -12,156 +12,170 @@ use CodeIgniter\Config\BaseConfig; 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. - * - * @var string - */ - 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. + * + * @var string + */ + 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. - * - * @var string - */ - 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. + * + * @var string + */ + public $backupHandler = 'dummy'; - /** - * -------------------------------------------------------------------------- - * Cache Directory Path - * -------------------------------------------------------------------------- - * - * The path to where cache files should be stored, if using a file-based - * system. - * - * @var string - * - * @deprecated Use the driver-specific variant under $file - */ - public $storePath = WRITEPATH . 'cache/'; + /** + * -------------------------------------------------------------------------- + * Cache Directory Path + * -------------------------------------------------------------------------- + * + * The path to where cache files should be stored, if using a file-based + * system. + * + * @var string + * + * @deprecated Use the driver-specific variant under $file + */ + 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. - * ['q') = Enabled, but only take into account the specified list - * of query parameters. - * - * @var boolean|string[] - */ - 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. + * + * @var bool|string[] + */ + 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. - * - * @var string - */ - 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. + * + * @var string + */ + public $prefix = ''; - /** - * -------------------------------------------------------------------------- - * Default TTL - * -------------------------------------------------------------------------- - * - * The default number of seconds to save items when none is specified. - * - * WARNING: This is not used by framework handlers where 60 seconds is - * hard-coded, but may be useful to projects and modules. This will replace - * the hard-coded value in a future release. - * - * @var integer - */ - public $ttl = 60; + /** + * -------------------------------------------------------------------------- + * Default TTL + * -------------------------------------------------------------------------- + * + * The default number of seconds to save items when none is specified. + * + * WARNING: This is not used by framework handlers where 60 seconds is + * hard-coded, but may be useful to projects and modules. This will replace + * the hard-coded value in a future release. + * + * @var int + */ + public $ttl = 60; - /** - * -------------------------------------------------------------------------- - * File settings - * -------------------------------------------------------------------------- - * Your file storage preferences can be specified below, if you are using - * the File driver. - * - * @var array - */ - public $file = [ - 'storePath' => WRITEPATH . 'cache/', - 'mode' => 0640, - ]; + /** + * -------------------------------------------------------------------------- + * Reserved Characters + * -------------------------------------------------------------------------- + * + * A string of reserved characters that will not be allowed in keys or tags. + * Strings that violate this restriction will cause handlers to throw. + * Default: {}()/\@: + * Note: The default set is required for PSR-6 compliance. + * + * @var string + */ + public $reservedCharacters = '{}()/\@:'; - /** - * ------------------------------------------------------------------------- - * Memcached settings - * ------------------------------------------------------------------------- - * Your Memcached servers can be specified below, if you are using - * the Memcached drivers. - * - * @see https://codeigniter.com/user_guide/libraries/caching.html#memcached - * - * @var array - */ - public $memcached = [ - 'host' => '127.0.0.1', - 'port' => 11211, - 'weight' => 1, - 'raw' => false, - ]; + /** + * -------------------------------------------------------------------------- + * File settings + * -------------------------------------------------------------------------- + * Your file storage preferences can be specified below, if you are using + * the File driver. + * + * @var array + */ + public $file = [ + 'storePath' => WRITEPATH . 'cache/', + 'mode' => 0640, + ]; - /** - * ------------------------------------------------------------------------- - * Redis settings - * ------------------------------------------------------------------------- - * Your Redis server can be specified below, if you are using - * the Redis or Predis drivers. - * - * @var array - */ - public $redis = [ - 'host' => '127.0.0.1', - 'password' => null, - 'port' => 6379, - 'timeout' => 0, - 'database' => 0, - ]; + /** + * ------------------------------------------------------------------------- + * Memcached settings + * ------------------------------------------------------------------------- + * Your Memcached servers can be specified below, if you are using + * the Memcached drivers. + * + * @see https://codeigniter.com/user_guide/libraries/caching.html#memcached + * + * @var array + */ + public $memcached = [ + 'host' => '127.0.0.1', + 'port' => 11211, + 'weight' => 1, + 'raw' => false, + ]; - /** - * -------------------------------------------------------------------------- - * Available Cache Handlers - * -------------------------------------------------------------------------- - * - * This is an array of cache engine alias' and class names. Only engines - * that are listed here are allowed to be used. - * - * @var array - */ - public $validHandlers = [ - 'dummy' => DummyHandler::class, - 'file' => FileHandler::class, - 'memcached' => MemcachedHandler::class, - 'predis' => PredisHandler::class, - 'redis' => RedisHandler::class, - 'wincache' => WincacheHandler::class, - ]; + /** + * ------------------------------------------------------------------------- + * Redis settings + * ------------------------------------------------------------------------- + * Your Redis server can be specified below, if you are using + * the Redis or Predis drivers. + * + * @var array + */ + public $redis = [ + 'host' => '127.0.0.1', + 'password' => null, + 'port' => 6379, + 'timeout' => 0, + 'database' => 0, + ]; + + /** + * -------------------------------------------------------------------------- + * Available Cache Handlers + * -------------------------------------------------------------------------- + * + * This is an array of cache engine alias' and class names. Only engines + * that are listed here are allowed to be used. + * + * @var array + */ + public $validHandlers = [ + 'dummy' => DummyHandler::class, + 'file' => FileHandler::class, + 'memcached' => MemcachedHandler::class, + 'predis' => PredisHandler::class, + 'redis' => RedisHandler::class, + 'wincache' => WincacheHandler::class, + ]; } diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 16be5e47f..276d5f8da 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -1,82 +1,98 @@ ` element. - * - * Will default to self if not overridden - * - * @var string|string[]|null - */ - public $baseURI = null; + /** + * Restricts the URLs that can appear in a page's `` element. + * + * Will default to self if not overridden + * + * @var string|string[]|null + */ + public $baseURI; - /** - * Lists the URLs for workers and embedded frame contents - * - * @var string|string[] - */ - public $childSrc = 'self'; + /** + * Lists the URLs for workers and embedded frame contents + * + * @var string|string[] + */ + public $childSrc = 'self'; - /** - * Limits the origins that you can connect to (via XHR, - * WebSockets, and EventSource). - * - * @var string|string[] - */ - public $connectSrc = 'self'; + /** + * Limits the origins that you can connect to (via XHR, + * WebSockets, and EventSource). + * + * @var string|string[] + */ + public $connectSrc = 'self'; - /** - * Specifies the origins that can serve web fonts. - * - * @var string|string[] - */ - public $fontSrc = null; + /** + * Specifies the origins that can serve web fonts. + * + * @var string|string[] + */ + public $fontSrc; - /** - * Lists valid endpoints for submission from `
` tags. - * - * @var string|string[] - */ - public $formAction = 'self'; + /** + * Lists valid endpoints for submission from `` tags. + * + * @var string|string[] + */ + public $formAction = 'self'; - /** - * Specifies the sources that can embed the current page. - * This directive applies to ``, `