feature/cierres #25

Open
aldarien wants to merge 446 commits from feature/cierres into develop
460 changed files with 1247 additions and 20505 deletions
Showing only changes of commit a44bd610ad - Show all commits

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception\ServiceAction;
use Throwable;
use Incoviba\Exception\ServiceActionFail;
class Create extends ServiceActionFail
{
public function __construct(string $service, Throwable $previous = null)
{
$action = 'create';
$code = 1;
parent::__construct($service, $action, $code, $previous);
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception\ServiceAction;
use Throwable;
use Incoviba\Exception\ServiceActionFail;
class Delete extends ServiceActionFail
{
public function __construct(string $service, Throwable $previous = null)
{
$action = 'delete';
$code = 4;
parent::__construct($service, $action, $code, $previous);
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception\ServiceAction;
use Throwable;
use Incoviba\Exception\ServiceActionFail;
class Read extends ServiceActionFail
{
public function __construct(string $service, Throwable $previous = null)
{
$action = 'read';
$code = 2;
parent::__construct($service, $action, $code, $previous);
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception\ServiceAction;
use Throwable;
use Incoviba\Exception\ServiceActionFail;
class Update extends ServiceActionFail
{
public function __construct(string $service, Throwable $previous = null)
{
$action = 'edit';
$code = 3;
parent::__construct($service, $action, $code, $previous);
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception;
use Exception;
use Throwable;
class ServiceActionFail extends Exception
{
public function __construct(string $service,string $action = "__invoke", int $code = 0, Throwable $previous = null)
{
$message = "Action {$action} failed for Service {$service}.";
$code = 700 + $code;
parent::__construct($message, $code, $previous);
}
}