Пример #1
0
 /**
  * @param Message|int $messageId
  * @param int $date
  * @param Chat $chat
  * @param User|null $from
  * @param User|null $forwardFrom
  * @param int|null $forwardDate
  * @param Message|null $replyToMessage
  */
 public function __construct($messageId, $date, $chat, User $from = null, User $forwardFrom = null, $forwardDate = null, Message $replyToMessage = null)
 {
     parent::__construct();
     if ($messageId instanceof Message) {
         $date = $messageId->getDate();
         $chat = $messageId->getChat();
         $from = $messageId->getFrom();
         $forwardFrom = $messageId->getForwardFrom();
         $forwardDate = $messageId->getForwardDate();
         $replyToMessage = $messageId->getReplyToMessage();
         $messageId = $messageId->getMessageId();
     }
     $this->messageId = $messageId;
     $this->date = $date;
     $this->chat = $chat;
     $this->from = $from;
     $this->forwardFrom = $forwardFrom;
     $this->forwardDate = $forwardDate;
     $this->replyToMessage = $replyToMessage;
 }
Пример #2
0
 /**
  * @param int $updateId
  * @param Message|null $message
  */
 public function __construct($updateId, $message = null)
 {
     parent::__construct();
     $this->updateId = $updateId;
     $this->message = $message;
 }