Added \TgBotLib\Interfaces > ObjectTypeInterface
This commit is contained in:
parent
a99d423968
commit
4a6cc9e40d
1 changed files with 21 additions and 0 deletions
21
src/TgBotLib/Interfaces/ObjectTypeInterface.php
Normal file
21
src/TgBotLib/Interfaces/ObjectTypeInterface.php
Normal 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue