D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
plib
/
modules
/
platform360
/
vendor
/
slim
/
slim
/
Slim
/
Exception
/
Filename :
HttpException.php
back
Copy
<?php /** * Slim Framework (https://slimframework.com) * * @license https://github.com/slimphp/Slim/blob/4.x/LICENSE.md (MIT License) */ declare (strict_types=1); namespace Platform360\Slim\Exception; use Platform360\Psr\Http\Message\ServerRequestInterface; use RuntimeException; use Throwable; /** * @api * @method int getCode() */ class HttpException extends RuntimeException { protected ServerRequestInterface $request; protected string $title = ''; protected string $description = ''; public function __construct(ServerRequestInterface $request, string $message = '', int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->request = $request; } public function getRequest() : ServerRequestInterface { return $this->request; } public function getTitle() : string { return $this->title; } public function setTitle(string $title) : self { $this->title = $title; return $this; } public function getDescription() : string { return $this->description; } public function setDescription(string $description) : self { $this->description = $description; return $this; } }