Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 80 additions & 153 deletions docs.md
Original file line number Diff line number Diff line change
@@ -1,194 +1,121 @@
## Table of contents
- [Rudra\Exceptions\ConfigurationException](#rudra_exceptions_configurationexception)
- [Rudra\Exceptions\DBException](#rudra_exceptions_dbexception)
- [Rudra\Exceptions\DatabaseException](#rudra_exceptions_databaseexception)
- [Rudra\Exceptions\EnvironmentException](#rudra_exceptions_environmentexception)
- [Rudra\Exceptions\ExceptionInterface](#rudra_exceptions_exceptioninterface)
- [Rudra\Exceptions\LogicException](#rudra_exceptions_logicexception)
- [Rudra\Exceptions\MiddlewareException](#rudra_exceptions_middlewareexception)
- [Rudra\Exceptions\NotFoundException](#rudra_exceptions_notfoundexception)
- [Rudra\Exceptions\RequestException](#rudra_exceptions_requestexception)
- [Rudra\Exceptions\RouterException](#rudra_exceptions_routerexception)
- [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
- [Rudra\Exceptions\RuntimeException](#rudra_exceptions_runtimeexception)
<hr>

<a id="rudra_exceptions_configurationexception"></a>
<a id="rudra_exceptions_exceptioninterface"></a>

### Class: Rudra\Exceptions\ConfigurationException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
### Class: Rudra\Exceptions\ExceptionInterface
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|


<a id="rudra_exceptions_dbexception"></a>

### Class: Rudra\Exceptions\DBException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|


<a id="rudra_exceptions_databaseexception"></a>

### Class: Rudra\Exceptions\DatabaseException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|


<a id="rudra_exceptions_environmentexception"></a>

### Class: Rudra\Exceptions\EnvironmentException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|


<a id="rudra_exceptions_logicexception"></a>

### Class: Rudra\Exceptions\LogicException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|
| public | `__construct(string $message, int $code, ?Throwable $previous)`<br> |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |


<a id="rudra_exceptions_notfoundexception"></a>
<a id="rudra_exceptions_middlewareexception"></a>

### Class: Rudra\Exceptions\NotFoundException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
### Class: Rudra\Exceptions\MiddlewareException
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|


<a id="rudra_exceptions_requestexception"></a>

### Class: Rudra\Exceptions\RequestException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| public | `__construct(string $message, int $code, ?Throwable $previous)`<br> |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |


<a id="rudra_exceptions_notfoundexception"></a>

### Class: Rudra\Exceptions\NotFoundException
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|
| public | `__construct(string $message, int $code, ?Throwable $previous)`<br> |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |


<a id="rudra_exceptions_routerexception"></a>

### Class: Rudra\Exceptions\RouterException
##### extends [Rudra\Exceptions\RudraException](#rudra_exceptions_rudraexception)
##### implements [Stringable](#stringable)
##### implements [Throwable](#throwable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( $message $code ?Exception $previous )</em><br>|
|public|<em><strong>exception_handler</strong>( $exception )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|
| public | `__construct( $message, $code, ?Exception $previous)`<br>Constructs a new RouterException and sets a global exception handler.<br>The exception handler will catch all unhandled exceptions of this type<br>and redirect them using RedirectFacade to the appropriate error page/controller.<br>-------------------------<br>Конструктор RouterException устанавливает глобальный обработчик исключений.<br>Обработчик перехватывает все неперехваченные исключения этого типа<br>и вызывает RedirectFacade для перехода к странице/контроллеру ошибки. |
| public | `exception_handler(Exception $exception): void`<br>Custom exception handler triggered by this class.<br>Uses RedirectFacade to send an HTTP status code and then calls the error handler,<br>which is defined in the config under `http.errors`.<br>-------------------------<br>Собственный обработчик исключений, запускаемый этим классом.<br>Использует RedirectFacade для отправки HTTP-статуса и вызова обработчика ошибок,<br>указанного в конфигурации под ключом `http.errors`. |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |


<a id="rudra_exceptions_rudraexception"></a>

### Class: Rudra\Exceptions\RudraException
##### extends [Exception](#exception)
##### implements [Throwable](#throwable)
##### implements [Stringable](#stringable)
| Visibility | Function |
|:-----------|:---------|
|public|<em><strong>__construct</strong>( string $message int $code ?Throwable $previous )</em><br>|
|public|<em><strong>__wakeup</strong>()</em><br>|
|final public|<em><strong>getMessage</strong>(): string</em><br>|
|final public|<em><strong>getCode</strong>()</em><br>|
|final public|<em><strong>getFile</strong>(): string</em><br>|
|final public|<em><strong>getLine</strong>(): int</em><br>|
|final public|<em><strong>getTrace</strong>(): array</em><br>|
|final public|<em><strong>getPrevious</strong>(): ?Throwable</em><br>|
|final public|<em><strong>getTraceAsString</strong>(): string</em><br>|
|public|<em><strong>__toString</strong>(): string</em><br>|
| public | `__construct(string $message, int $code, ?Throwable $previous)`<br> |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |


<a id="rudra_exceptions_runtimeexception"></a>

### Class: Rudra\Exceptions\RuntimeException
| Visibility | Function |
|:-----------|:---------|
| public | `__construct(string $message, int $code, ?Throwable $previous)`<br> |
| public | `__wakeup()`<br> |
| final public | `getMessage(): string`<br> |
| final public | `getCode()`<br> |
| final public | `getFile(): string`<br> |
| final public | `getLine(): int`<br> |
| final public | `getTrace(): array`<br> |
| final public | `getPrevious(): ?Throwable`<br> |
| final public | `getTraceAsString(): string`<br> |
| public | `__toString(): string`<br> |
<hr>

###### created with [Rudra-Documentation-Collector](#https://github.com/Jagepard/Rudra-Documentation-Collector)
12 changes: 0 additions & 12 deletions src/ConfigurationException.php

This file was deleted.

17 changes: 0 additions & 17 deletions src/DBException.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/DatabaseException.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/EnvironmentException.php

This file was deleted.

21 changes: 3 additions & 18 deletions src/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

declare(strict_types=1);

namespace Rudra\Exceptions;

/**
* ExceptionInterface
* ==================
*
* A marker interface used to tag all custom exceptions within the Rudra framework.
*
* This empty interface serves as a common base for grouping and filtering exceptions,
Expand All @@ -24,14 +23,7 @@
* // Handle any Rudra-related exception uniformly
* }
* ```
*
* @package Rudra\Exceptions
* @see \Rudra\Exceptions\MiddlewareException
* @see \Rudra\Exceptions\RouterException
* ----------------------------------------------------------------------------
* ExceptionInterface
* ==================
*
* ---------------------
* Маркерный интерфейс, используемый для группировки всех пользовательских исключений в фреймворке Rudra.
*
* Этот пустой интерфейс служит общей точкой отсчёта для группировки и фильтрации исключений,
Expand All @@ -50,14 +42,7 @@
* // Единым образом обрабатываем все исключения из Rudra
* }
* ```
*
* @package Rudra\Exceptions
* @see \Rudra\Exceptions\MiddlewareException
* @see \Rudra\Exceptions\RouterException
*/

namespace Rudra\Exceptions;

interface ExceptionInterface
{
// Пустой интерфейс — используется только как маркер для пользовательских исключений
Expand Down
Loading
Loading