BadComparisonUnitException.php
3 years ago
BadFluentConstructorException.php
3 years ago
BadFluentSetterException.php
3 years ago
BadMethodCallException.php
3 years ago
EndLessPeriodException.php
3 years ago
Exception.php
3 years ago
ImmutableException.php
3 years ago
InvalidArgumentException.php
3 years ago
InvalidCastException.php
3 years ago
InvalidDateException.php
3 years ago
InvalidFormatException.php
3 years ago
InvalidIntervalException.php
3 years ago
InvalidPeriodDateException.php
3 years ago
InvalidPeriodParameterException.php
3 years ago
InvalidTimeZoneException.php
3 years ago
InvalidTypeException.php
3 years ago
NotACarbonClassException.php
3 years ago
NotAPeriodException.php
3 years ago
NotLocaleAwareException.php
3 years ago
OutOfRangeException.php
3 years ago
ParseErrorException.php
3 years ago
RuntimeException.php
3 years ago
UnitException.php
3 years ago
UnitNotConfiguredException.php
3 years ago
UnknownGetterException.php
3 years ago
UnknownMethodException.php
3 years ago
UnknownSetterException.php
3 years ago
UnknownUnitException.php
3 years ago
UnreachableException.php
3 years ago
index.php
3 years ago
InvalidDateException.php
25 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Carbon\Exceptions; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use InvalidArgumentException as BaseInvalidArgumentException; |
| 5 | use Throwable; |
| 6 | class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException |
| 7 | { |
| 8 | private $field; |
| 9 | private $value; |
| 10 | public function __construct($field, $value, $code = 0, Throwable $previous = null) |
| 11 | { |
| 12 | $this->field = $field; |
| 13 | $this->value = $value; |
| 14 | parent::__construct($field . ' : ' . $value . ' is not a valid value.', $code, $previous); |
| 15 | } |
| 16 | public function getField() |
| 17 | { |
| 18 | return $this->field; |
| 19 | } |
| 20 | public function getValue() |
| 21 | { |
| 22 | return $this->value; |
| 23 | } |
| 24 | } |
| 25 |