From 019afe6c8f458f54b8030e0c16c36c359b2fd91f Mon Sep 17 00:00:00 2001 From: Netkas Date: Sun, 12 Feb 2023 22:40:33 -0500 Subject: [PATCH] Added \TgBotLib\Objects > WebAppInfo --- src/TgBotLib/Objects/WebAppInfo.php | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/TgBotLib/Objects/WebAppInfo.php diff --git a/src/TgBotLib/Objects/WebAppInfo.php b/src/TgBotLib/Objects/WebAppInfo.php new file mode 100644 index 0000000..e9fda11 --- /dev/null +++ b/src/TgBotLib/Objects/WebAppInfo.php @@ -0,0 +1,49 @@ +url; + } + + /** + * Returns an array representation of the object. + * + * @return array + */ + public function toArray(): array + { + return [ + 'url' => $this->url, + ]; + } + + /** + * Constructs the object from an array representation. + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->url = $data['url']; + return $object; + } + } \ No newline at end of file