From e6926123eedea854de98e60de8a7fa391644d3f0 Mon Sep 17 00:00:00 2001 From: Netkas Date: Sun, 12 Feb 2023 19:26:11 -0500 Subject: [PATCH] Added \TgBotLib\Objects > ForumTopicEdited --- src/TgBotLib/Objects/ForumTopicEdited.php | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/TgBotLib/Objects/ForumTopicEdited.php diff --git a/src/TgBotLib/Objects/ForumTopicEdited.php b/src/TgBotLib/Objects/ForumTopicEdited.php new file mode 100644 index 0000000..33cca2b --- /dev/null +++ b/src/TgBotLib/Objects/ForumTopicEdited.php @@ -0,0 +1,70 @@ +name; + } + + /** + * Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; + * an empty string if the icon was removed + * + * @return string|null + */ + public function getIconCustomEmojiId(): ?string + { + return $this->icon_custom_emoji_id; + } + + /** + * Returns array representation of object + * + * @return array + */ + public function toArray(): array + { + return [ + 'name' => $this->name ?? null, + 'icon_custom_emoji_id' => $this->icon_custom_emoji_id ?? null, + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + + $object->name = @$data['name'] ?? null; + $object->icon_custom_emoji_id = @$data['icon_custom_emoji_id'] ?? null; + + return $object; + } + } \ No newline at end of file