From 47743dd48743dd60e36ee1f5fddb313cc73dc514 Mon Sep 17 00:00:00 2001 From: Netkas Date: Mon, 13 Feb 2023 13:57:03 -0500 Subject: [PATCH] Added \TgBotLib\Objects > InlineKeyboardMarkup --- src/TgBotLib/Objects/InlineKeyboardMarkup.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/TgBotLib/Objects/InlineKeyboardMarkup.php diff --git a/src/TgBotLib/Objects/InlineKeyboardMarkup.php b/src/TgBotLib/Objects/InlineKeyboardMarkup.php new file mode 100644 index 0000000..a8bcdf5 --- /dev/null +++ b/src/TgBotLib/Objects/InlineKeyboardMarkup.php @@ -0,0 +1,52 @@ +inline_keyboard; + } + + /** + * Returns an array representation of the object + * + * @return InlineKeyboardButton[][][] + */ + public function toArray(): array + { + return [ + 'inline_keyboard' => $this->inline_keyboard, + ]; + } + + /** + * Constructs the object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->inline_keyboard = @$data['inline_keyboard'] ?? null; + return $object; + } + + } \ No newline at end of file