composer package updates
[openemr.git] / vendor / nesbot / carbon / src / Carbon / Exceptions / InvalidDateException.php
blob1b0d47377772e1d3f7d5f2b37f54c01c28c908b8
1 <?php
3 /*
4 * This file is part of the Carbon package.
6 * (c) Brian Nesbitt <brian@nesbot.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Carbon\Exceptions;
14 use Exception;
15 use InvalidArgumentException;
17 class InvalidDateException extends InvalidArgumentException
19 /**
20 * The invalid field.
22 * @var string
24 private $field;
26 /**
27 * The invalid value.
29 * @var mixed
31 private $value;
33 /**
34 * Constructor.
36 * @param string $field
37 * @param mixed $value
38 * @param int $code
39 * @param \Exception|null $previous
41 public function __construct($field, $value, $code = 0, Exception $previous = null)
43 $this->field = $field;
44 $this->value = $value;
45 parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous);
48 /**
49 * Get the invalid field.
51 * @return string
53 public function getField()
55 return $this->field;
58 /**
59 * Get the invalid value.
61 * @return mixed
63 public function getValue()
65 return $this->value;