Remove obsolete ClientRequestOld and RpcHandler classes

This commit is contained in:
netkas 2024-12-23 19:03:43 -05:00
parent 395e6b95ff
commit 23262bc0a6
5 changed files with 17 additions and 386 deletions

View file

@ -1,26 +1,21 @@
<?php
namespace Socialbox\Abstracts;
namespace Socialbox\Abstracts;
use Socialbox\Enums\StandardError;
use Socialbox\Exceptions\DatabaseOperationException;
use Socialbox\Exceptions\StandardException;
use Socialbox\Interfaces\SerializableInterface;
use Socialbox\Managers\SessionManager;
use Socialbox\Objects\ClientRequest;
use Socialbox\Objects\ClientRequestOld;
use Socialbox\Objects\Database\SessionRecord;
use Socialbox\Objects\RpcRequest;
use Socialbox\Exceptions\StandardException;
use Socialbox\Interfaces\SerializableInterface;
use Socialbox\Objects\ClientRequest;
use Socialbox\Objects\RpcRequest;
abstract class Method
{
/**
* Executes the method and returns RpcResponse/RpcError which implements SerializableInterface
*
* @param ClientRequest $request The full client request object, used to identify the client & it's requests
* @param RpcRequest $rpcRequest The selected RPC request for the method to handle
* @return SerializableInterface|null Returns RpcResponse/RpcError on success, null if the request is a notification
* @throws StandardException If a standard exception is thrown, it will be handled by the engine.
*/
public static abstract function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface;
}
abstract class Method
{
/**
* Executes the method and returns RpcResponse/RpcError which implements SerializableInterface
*
* @param ClientRequest $request The full client request object, used to identify the client & it's requests
* @param RpcRequest $rpcRequest The selected RPC request for the method to handle
* @return SerializableInterface|null Returns RpcResponse/RpcError on success, null if the request is a notification
* @throws StandardException If a standard exception is thrown, it will be handled by the engine.
*/
public static abstract function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface;
}