diff --git a/src/TgBotLib/Objects/BotName.php b/src/TgBotLib/Objects/BotName.php new file mode 100644 index 0000000..5a29823 --- /dev/null +++ b/src/TgBotLib/Objects/BotName.php @@ -0,0 +1,46 @@ +name; + } + + /** + * @inheritDoc + */ + public function toArray(): ?array + { + return [ + 'name' => $this->name + ]; + } + + /** + * @inheritDoc + */ + public static function fromArray(?array $data): ?BotName + { + if($data === null) + { + return null; + } + + $object = new self(); + $object->name = $data['name']; + + return $object; + } + } \ No newline at end of file