Conversie codeigniter 4
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
namespace Config;
|
||||
|
||||
use CodeIgniter\Config\BaseConfig;
|
||||
use CodeIgniter\Debug\ExceptionHandler;
|
||||
use CodeIgniter\Debug\ExceptionHandlerInterface;
|
||||
use Psr\Log\LogLevel;
|
||||
use Throwable;
|
||||
|
||||
class Exceptions extends BaseConfig
|
||||
{
|
||||
/**
|
||||
* Log Exceptions?
|
||||
*/
|
||||
public bool $log = true;
|
||||
|
||||
/**
|
||||
* DO NOT log These Exceptions.
|
||||
*
|
||||
* @var list<class-string<Throwable>>
|
||||
*/
|
||||
public array $ignoreCodes = [404];
|
||||
|
||||
/**
|
||||
* Error Views Path
|
||||
*/
|
||||
public string $errorViewPath = APPPATH . 'Views/errors';
|
||||
|
||||
/**
|
||||
* Hide Error Messages?
|
||||
*/
|
||||
public bool $hideErrors = false;
|
||||
|
||||
/**
|
||||
* Custom Exception Handler for AJAX requests
|
||||
*
|
||||
* @var class-string<ExceptionHandlerInterface>|null
|
||||
*/
|
||||
public ?string $handler = null;
|
||||
|
||||
/**
|
||||
* Sensitive Data in Trace
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
public array $sensitiveDataInTraceStep = [
|
||||
'password',
|
||||
'pass',
|
||||
'salt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Sensitive Data in Trace (for deprecated property)
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
public array $sensitiveDataInTrace = [
|
||||
'password',
|
||||
'pass',
|
||||
'salt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Whether to log deprecation warnings.
|
||||
*/
|
||||
public bool $logDeprecations = true;
|
||||
|
||||
/**
|
||||
* The log level for deprecation warnings.
|
||||
*/
|
||||
public string $deprecationLogLevel = LogLevel::WARNING;
|
||||
|
||||
public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface
|
||||
{
|
||||
return new ExceptionHandler($this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user