| 1 | <?php namespace nyx\core\collections\exceptions; |
||
| 14 | class KeyAlreadyExists extends collections\Exception |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var mixed The key the value was attempted to be set as. |
||
| 18 | */ |
||
| 19 | private $key; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var mixed The value that was attempted to be set with the given key. |
||
| 23 | */ |
||
| 24 | private $value; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | * |
||
| 29 | * @param mixed $key The key the value was attempted to be set as. |
||
| 30 | * @param mixed $value The value that was attempted to be set with the given key. |
||
| 31 | */ |
||
| 32 | public function __construct(collections\interfaces\Collection $collection, $key, $value, string $message = null, $code = 0, $previous = null) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns the key the value was attempted to be set as. |
||
| 42 | * |
||
| 43 | * @return mixed |
||
| 44 | */ |
||
| 45 | public function getKey() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Returns the value that was attempted to be set with the given key. |
||
| 52 | * |
||
| 53 | * @return mixed |
||
| 54 | */ |
||
| 55 | public function getValue() |
||
| 59 | } |
||
| 60 |