Added Standard Objects for the encryption channel
This commit is contained in:
parent
0e08bef3bc
commit
d929a9ec4c
4 changed files with 405 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
use Socialbox\Enums\Status\EncryptionChannelState;
|
||||
use Socialbox\Interfaces\SerializableInterface;
|
||||
use Socialbox\Objects\PeerAddress;
|
||||
use Socialbox\Objects\Standard\EncryptionChannel;
|
||||
|
||||
class EncryptionChannelRecord implements SerializableInterface
|
||||
{
|
||||
|
@ -256,4 +257,14 @@
|
|||
'created' => $this->created->format('Y-m-d H:i:s')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Encryption Channel Record to a Standard Encryption Channel
|
||||
*
|
||||
* @return EncryptionChannel
|
||||
*/
|
||||
public function toStandard(): EncryptionChannel
|
||||
{
|
||||
return new EncryptionChannel($this->toArray());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue