| 1 | <?php |
||
| 9 | class Error |
||
| 10 | { |
||
| 11 | const ERROR_CODE = 'UNKNOWN'; |
||
| 12 | |||
| 13 | /** @var string[] */ |
||
| 14 | protected $params = [ |
||
| 15 | 'code' => self::ERROR_CODE |
||
| 16 | ]; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | protected $message = 'ERROR(%code%) occurred'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Error constructor. |
||
| 23 | * @param null $code |
||
| 24 | * @param null $message |
||
| 25 | */ |
||
| 26 | 19 | public function __construct($code = null, $message = null) |
|
| 41 | |||
| 42 | 16 | public function addParams($params) |
|
| 46 | |||
| 47 | 18 | public function getMessage() |
|
| 51 | |||
| 52 | 1 | public function getCode() |
|
| 56 | } |
||
| 57 |