mailpoet
/
vendor-prefixed
/
nesbot
/
carbon
/
src
/
Carbon
/
Exceptions
/
NotACarbonClassException.php
BadComparisonUnitException.php
8 months ago
BadFluentConstructorException.php
8 months ago
BadFluentSetterException.php
8 months ago
BadMethodCallException.php
3 years ago
EndLessPeriodException.php
3 years ago
Exception.php
3 years ago
ImmutableException.php
8 months ago
InvalidArgumentException.php
3 years ago
InvalidCastException.php
3 years ago
InvalidDateException.php
8 months 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
8 months ago
NotAPeriodException.php
3 years ago
NotLocaleAwareException.php
8 months ago
OutOfRangeException.php
8 months ago
ParseErrorException.php
8 months ago
RuntimeException.php
3 years ago
UnitException.php
3 years ago
UnitNotConfiguredException.php
8 months ago
UnknownGetterException.php
8 months ago
UnknownMethodException.php
8 months ago
UnknownSetterException.php
8 months ago
UnknownUnitException.php
8 months ago
UnreachableException.php
3 years ago
index.php
3 years ago
NotACarbonClassException.php
20 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Carbon\Exceptions; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Carbon\CarbonInterface; |
| 5 | use InvalidArgumentException as BaseInvalidArgumentException; |
| 6 | use Throwable; |
| 7 | class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException |
| 8 | { |
| 9 | protected $className; |
| 10 | public function __construct($className, $code = 0,?Throwable $previous = null) |
| 11 | { |
| 12 | $this->className = $className; |
| 13 | parent::__construct(\sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); |
| 14 | } |
| 15 | public function getClassName() : string |
| 16 | { |
| 17 | return $this->className; |
| 18 | } |
| 19 | } |
| 20 |