From 8926b42dcac71f2f3488e7433b98db2d734d9b47 Mon Sep 17 00:00:00 2001 From: Netkas Date: Sun, 12 Feb 2023 21:54:26 -0500 Subject: [PATCH] Added \TgBotLib\Objects > VideoChatParticipantsInvited --- .../Objects/VideoChatParticipantsInvited.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/TgBotLib/Objects/VideoChatParticipantsInvited.php diff --git a/src/TgBotLib/Objects/VideoChatParticipantsInvited.php b/src/TgBotLib/Objects/VideoChatParticipantsInvited.php new file mode 100644 index 0000000..bba8536 --- /dev/null +++ b/src/TgBotLib/Objects/VideoChatParticipantsInvited.php @@ -0,0 +1,45 @@ + array_map(function (User $user) { + return $user->toArray(); + }, $this->users), + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->users = array_map(function (array $user) { + return User::fromArray($user); + }, $data['users']); + return $object; + } + } \ No newline at end of file