mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-27 13:39:16 +00:00
c916a1dd2e
- Change variable $values to $settings in Route::setSettings method. - Added return types to methods. - Added type to method variables. - Change ClassNotFoundException so required parameters are first.
38 lines
723 B
PHP
38 lines
723 B
PHP
<?php
|
|
|
|
namespace Pecee\SimpleRouter\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
class ClassNotFoundHttpException extends NotFoundHttpException
|
|
{
|
|
protected $class;
|
|
protected $method;
|
|
|
|
public function __construct(string $class, ?string $method = null, $message = "", $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;
|
|
}
|
|
|
|
} |