mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-20 18:21:25 +00:00
b3c135c723
- Fixed DebugHandler::fireEvent not providing correct arguments when calling fireEvents. - Fixed custom regex setMatch not setting parsed parameters correctly (issue: #566). - Added unit-tests for catching issue in the future. - Added php-stan typehints.
45 lines
810 B
PHP
45 lines
810 B
PHP
<?php
|
|
|
|
namespace Pecee\SimpleRouter\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
class ClassNotFoundHttpException extends NotFoundHttpException
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $class;
|
|
|
|
/**
|
|
* @var string|null
|
|
*/
|
|
protected $method;
|
|
|
|
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;
|
|
}
|
|
|
|
} |