Geen omschrijving

NotACarbonClassException.php 908B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * This file is part of the Carbon package.
  4. *
  5. * (c) Brian Nesbitt <brian@nesbot.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Carbon\Exceptions;
  11. use Carbon\CarbonInterface;
  12. use Exception;
  13. use InvalidArgumentException as BaseInvalidArgumentException;
  14. class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException
  15. {
  16. /**
  17. * Constructor.
  18. *
  19. * @param string $className
  20. * @param int $code
  21. * @param Exception|null $previous
  22. */
  23. public function __construct($className, $code = 0, Exception $previous = null)
  24. {
  25. parent::__construct(sprintf(
  26. 'Given class does not implement %s: %s',
  27. CarbonInterface::class,
  28. $className
  29. ), $code, $previous);
  30. }
  31. }