Files
apimacro/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php

50 lines
1.0 KiB
PHP
Raw Normal View History

2024-05-07 12:17:25 +02:00
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
2024-05-17 12:24:19 +00:00
use Throwable;
2024-05-07 12:17:25 +02:00
class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException
{
2024-05-17 12:24:19 +00:00
/**
* The method.
*
* @var string
*/
protected $method;
2024-05-07 12:17:25 +02:00
/**
* Constructor.
*
* @param string $method
* @param int $code
2024-05-17 12:24:19 +00:00
* @param Throwable|null $previous
2024-05-07 12:17:25 +02:00
*/
2024-05-17 12:24:19 +00:00
public function __construct($method, $code = 0, Throwable $previous = null)
2024-05-07 12:17:25 +02:00
{
2024-05-17 12:24:19 +00:00
$this->method = $method;
2024-05-07 12:17:25 +02:00
parent::__construct("Method $method does not exist.", $code, $previous);
}
2024-05-17 12:24:19 +00:00
/**
* Get the method.
*
* @return string
*/
public function getMethod(): string
{
return $this->method;
}
2024-05-07 12:17:25 +02:00
}