tgbotlib/src/TgBotLib/Objects/BotShortDescription.php
2024-10-04 14:07:46 -04:00

47 lines
No EOL
1,002 B
PHP

<?php
namespace TgBotLib\Objects;
use TgBotLib\Interfaces\ObjectTypeInterface;
class BotShortDescription implements ObjectTypeInterface
{
private string $short_description;
/**
* The bot's short description
*
* @return string
*/
public function getShortDescription(): string
{
return $this->short_description;
}
/**
* @inheritDoc
*/
public function toArray(): array
{
return [
'short_description' => $this->short_description,
];
}
/**
* @inheritDoc
*/
public static function fromArray(?array $data): ?BotShortDescription
{
if($data === null)
{
return null;
}
$object = new self();
$object->short_description = $data['short_description'];
return $object;
}
}