tgbotlib/src/TgBotLib/Objects/VideoChatScheduled.php

47 lines
1,015 B
PHP
Raw Normal View History

<?php
2024-10-02 00:18:12 -04:00
namespace TgBotLib\Objects;
use TgBotLib\Interfaces\ObjectTypeInterface;
class VideoChatScheduled implements ObjectTypeInterface
{
2024-10-06 16:04:40 -04:00
private int $start_date;
/**
* Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator
*
* @return int
*/
public function getStartDate(): int
{
return $this->start_date;
}
/**
2024-10-06 16:04:40 -04:00
* @inheritDoc
*/
public function toArray(): array
{
return [
'start_date' => $this->start_date,
];
}
/**
2024-10-06 16:04:40 -04:00
* @inheritDoc
*/
2024-10-06 16:04:40 -04:00
public static function fromArray(?array $data): ?VideoChatScheduled
{
2024-10-06 16:04:40 -04:00
if($data === null)
{
return null;
}
$object = new self();
$object->start_date = $data['start_date'];
2024-10-06 16:04:40 -04:00
return $object;
}
}