Added \TgBotLib\Interfaces > ObjectTypeInterface

This commit is contained in:
Netkas 2023-02-12 14:42:20 -05:00
parent a99d423968
commit 4a6cc9e40d

View file

@ -0,0 +1,21 @@
<?php
namespace TgBotLib\Interfaces;
interface ObjectTypeInterface
{
/**
* Returns an array representation of the object
*
* @return array
*/
public function toArray(): array;
/**
* Reconstruction of the object from an array
*
* @param array $data
* @return ObjectTypeInterface
*/
public static function fromArray(array $data): ObjectTypeInterface;
}