Exceptions
extends BaseConfig
in package
Setup how the exception handler works.
Table of Contents
- $errorViewPath : string
- -------------------------------------------------------------------------- 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.
- $ignoreCodes : array<string|int, mixed>
- -------------------------------------------------------------------------- DO NOT LOG STATUS CODES -------------------------------------------------------------------------- Any status codes here will NOT be logged if logging is turned on.
- $log : bool
- -------------------------------------------------------------------------- LOG EXCEPTIONS? -------------------------------------------------------------------------- If true, then exceptions will be logged through Services::Log.
- $registrars : array<string|int, mixed>
- An optional array of classes that will act as Registrars for rapidly setting config class properties.
- $sensitiveDataInTrace : array<string|int, mixed>
- -------------------------------------------------------------------------- HIDE FROM DEBUG TRACE -------------------------------------------------------------------------- Any data that you would like to hide from the debug trace.
- $didDiscovery : bool
- Has module discovery happened yet?
- $moduleConfig : Modules
- The modules configuration.
- __construct() : mixed
- Will attempt to get environment variables with names that match the properties of the child class.
- getEnvValue() : mixed
- Retrieve an environment-specific configuration setting
- initEnvValue() : mixed
- Initialization an environment-specific configuration setting
- registerProperties() : mixed
- Provides external libraries a simple way to register one or more options into a config file.
Properties
$errorViewPath
-------------------------------------------------------------------------- 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.
public
string
$errorViewPath
= APPPATH . 'Views/errors'
Default: APPPATH.'Views/errors'
$ignoreCodes
-------------------------------------------------------------------------- DO NOT LOG STATUS CODES -------------------------------------------------------------------------- Any status codes here will NOT be logged if logging is turned on.
public
array<string|int, mixed>
$ignoreCodes
= [404]
By default, only 404 (Page Not Found) exceptions are ignored.
$log
-------------------------------------------------------------------------- LOG EXCEPTIONS? -------------------------------------------------------------------------- If true, then exceptions will be logged through Services::Log.
public
bool
$log
= true
Default: true
$registrars
An optional array of classes that will act as Registrars for rapidly setting config class properties.
public
static array<string|int, mixed>
$registrars
= []
$sensitiveDataInTrace
-------------------------------------------------------------------------- HIDE FROM DEBUG TRACE -------------------------------------------------------------------------- Any data that you would like to hide from the debug trace.
public
array<string|int, mixed>
$sensitiveDataInTrace
= []
In order to specify 2 levels, use "/" to separate. ex. ['server', 'setup/password', 'secret_token']
$didDiscovery
Has module discovery happened yet?
protected
static bool
$didDiscovery
= false
$moduleConfig
The modules configuration.
protected
static Modules
$moduleConfig
Methods
__construct()
Will attempt to get environment variables with names that match the properties of the child class.
public
__construct() : mixed
The "shortPrefix" is the lowercase-only config class name.
Return values
mixed —getEnvValue()
Retrieve an environment-specific configuration setting
protected
getEnvValue(string $property, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —initEnvValue()
Initialization an environment-specific configuration setting
protected
initEnvValue(mixed &$property, string $name, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : mixed
- $name : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —registerProperties()
Provides external libraries a simple way to register one or more options into a config file.
protected
registerProperties() : mixed