Remove unused StandardMethods and improve session logic

This commit is contained in:
netkas 2024-12-12 04:33:10 -05:00
parent 86435a3d0b
commit 701acfde35
30 changed files with 1032 additions and 704 deletions

View file

@ -1,14 +1,14 @@
<?php
namespace Socialbox\Exceptions;
namespace Socialbox\Exceptions;
use Exception;
use Throwable;
use Exception;
use Throwable;
class DatabaseOperationException extends Exception
{
public function __construct(string $message, ?Throwable $throwable=null)
class DatabaseOperationException extends Exception
{
parent::__construct($message, 500, $throwable);
}
}
public function __construct(string $message, ?Throwable $throwable=null)
{
parent::__construct($message, 500, $throwable);
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace Socialbox\Exceptions;
use Exception;
use Throwable;
class RequestException extends Exception
{
/**
* Initializes a new instance of the exception class with a custom message, code, and a previous throwable.
*
* @param string $message The exception message. Defaults to an empty string.
* @param int $code The exception code. Defaults to 0.
* @param Throwable|null $previous The previous throwable used for exception chaining. Defaults to null.
*/
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}