-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add ExceptionLevelsInterface - Add ExceptionLevelsTrait - Update Exceptions
- Loading branch information
Artem O. Architect
committed
Feb 19, 2021
1 parent
96dca89
commit 2a8ba29
Showing
13 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MicroModule\Base\Domain\Exception; | ||
|
||
use Throwable; | ||
|
||
/** | ||
* Interface ExceptionLevelsInterface. | ||
* | ||
* @category Exception | ||
*/ | ||
interface ExceptionLevelsInterface | ||
{ | ||
public const EXCEPTION_LEVEL_EMERGENCY = 'emergency'; | ||
public const EXCEPTION_LEVEL_ALERT = 'alert'; | ||
public const EXCEPTION_LEVEL_CRITICAL = 'critical'; | ||
public const EXCEPTION_LEVEL_ERROR = 'error'; | ||
|
||
/** | ||
* Return exception level const. | ||
*/ | ||
public function getExceptionLevel(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MicroModule\Base\Domain\Exception; | ||
|
||
use Throwable; | ||
|
||
/** | ||
* Trait ParentExceptionTrait. | ||
* | ||
* @category Exception | ||
*/ | ||
trait ExceptionLevelsTrait | ||
{ | ||
/** | ||
* Exception level. | ||
*/ | ||
protected string $levels = ExceptionLevelsInterface::EXCEPTION_LEVEL_ERROR; | ||
|
||
/** | ||
* Return exception level const. | ||
*/ | ||
public function getExceptionLevel(): string | ||
{ | ||
return $this->levels; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters