2022-06-22 10:48:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Modules\Api\Rest\V1\Config;
|
|
|
|
|
|
|
|
use CodeIgniter\Config\BaseService;
|
2023-08-27 13:26:06 +00:00
|
|
|
use Config\Exceptions as ExceptionsConfig;
|
2022-06-22 10:48:58 +00:00
|
|
|
use Modules\Api\Rest\V1\Core\Exceptions;
|
|
|
|
|
|
|
|
class Services extends BaseService
|
|
|
|
{
|
|
|
|
public static function restApiExceptions(bool $getShared = true)
|
|
|
|
{
|
|
|
|
if ($getShared) {
|
|
|
|
return static::getSharedInstance('restApiExceptions');
|
|
|
|
}
|
|
|
|
|
2023-08-27 13:26:06 +00:00
|
|
|
return new Exceptions(config(ExceptionsConfig::class), static::request(), static::response());
|
2022-06-22 10:48:58 +00:00
|
|
|
}
|
|
|
|
}
|