mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-25 12:39:16 +00:00
5946397c15
- Request: optimized getIp method and reversed the order so proxy is always checked first.
45 lines
832 B
PHP
45 lines
832 B
PHP
<?php
|
|
|
|
namespace Pecee\SimpleRouter\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
class ClassNotFoundHttpException extends NotFoundHttpException
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected string $class;
|
|
|
|
/**
|
|
* @var string|null
|
|
*/
|
|
protected ?string $method = null;
|
|
|
|
public function __construct(string $class, ?string $method = null, string $message = "", int $code = 0, Throwable $previous = null)
|
|
{
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
$this->class = $class;
|
|
$this->method = $method;
|
|
}
|
|
|
|
/**
|
|
* Get class name
|
|
* @return string
|
|
*/
|
|
public function getClass(): string
|
|
{
|
|
return $this->class;
|
|
}
|
|
|
|
/**
|
|
* Get method
|
|
* @return string|null
|
|
*/
|
|
public function getMethod(): ?string
|
|
{
|
|
return $this->method;
|
|
}
|
|
|
|
} |