Renamed PeerRecord to PeerDatabaseRecord

This commit is contained in:
netkas 2025-01-31 15:13:12 -05:00
parent 148a65c2f7
commit 7a39b0fd35
8 changed files with 99 additions and 110 deletions

View file

@ -11,7 +11,7 @@
use Socialbox\Exceptions\Standard\StandardRpcException;
use Socialbox\Managers\RegisteredPeerManager;
use Socialbox\Managers\SessionManager;
use Socialbox\Objects\Database\PeerRecord;
use Socialbox\Objects\Database\PeerDatabaseRecord;
use Socialbox\Objects\Database\SessionRecord;
class ClientRequest
@ -185,11 +185,11 @@
/**
* Retrieves the associated peer for the current session.
*
* @return PeerRecord|null Returns the associated RegisteredPeerRecord if available, or null if no session exists.
* @return PeerDatabaseRecord|null Returns the associated RegisteredPeerRecord if available, or null if no session exists.
* @throws DatabaseOperationException Thrown if an error occurs while retrieving the peer.
* @throws StandardRpcException Thrown if the session UUID is invalid.
*/
public function getPeer(): ?PeerRecord
public function getPeer(): ?PeerDatabaseRecord
{
$session = $this->getSession();

View file

@ -8,9 +8,8 @@
use Socialbox\Enums\Flags\PeerFlags;
use Socialbox\Interfaces\SerializableInterface;
use Socialbox\Objects\Standard\Peer;
use Socialbox\Objects\Standard\SelfUser;
class PeerRecord implements SerializableInterface
class PeerDatabaseRecord implements SerializableInterface
{
private string $uuid;
private string $username;
@ -195,16 +194,6 @@
return $this->username === 'host' && $this->server !== Configuration::getInstanceConfiguration()->getDomain();
}
/**
* Converts the current instance to a SelfUser object.
*
* @return SelfUser The SelfUser object.
*/
public function toSelfUser(): SelfUser
{
return new SelfUser($this);
}
/**
* Converts the current instance to a Peer object.
*