1 | <?php namespace CMPayments\JsonLint\Exceptions; |
||
8 | class DuplicateKeyException extends JsonLintException |
||
9 | { |
||
10 | const ERROR_PARSE_ERROR_DUPLICATE_KEY = 1; |
||
11 | |||
12 | protected $messages = [ |
||
13 | self::ERROR_PARSE_ERROR_DUPLICATE_KEY => 'Parse error on line %d, duplicate key: %s' |
||
14 | ]; |
||
15 | |||
16 | private $key = null; |
||
17 | |||
18 | /** |
||
19 | * ApiException constructor. |
||
20 | * |
||
21 | * @param string $code |
||
22 | * @param array $key |
||
23 | * @param array $args |
||
24 | * @param null $message |
||
25 | */ |
||
26 | public function __construct($code, $key, $args = [], $message = null) |
||
27 | { |
||
28 | $this->key = $key; |
||
29 | |||
30 | parent::__construct($code, $args, $message); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return mixed |
||
35 | */ |
||
36 | public function getKey() |
||
40 | } |
||
41 |