示例#1
0
 public function parseMessage($raw_post_data)
 {
     return Update::fromResponse(self::jsonValidate($raw_post_data, true))->getMessage();
 }
示例#2
0
文件: Client.php 项目: baravak/Api
 /**
  * Webhook handler
  *
  * @return array
  * @throws \TelegramBot\Api\InvalidJsonException
  */
 public function run()
 {
     if ($data = BotApi::jsonValidate($this->getRawBody(), true)) {
         $this->handle([Update::fromResponse($data)]);
     }
 }
示例#3
0
文件: Client.php 项目: zzbomb/Api
 /**
  * Webhook handler
  *
  * @return array
  * @throws \TelegramBot\Api\InvalidJsonException
  */
 public function run()
 {
     if ($data = BotApi::jsonValidate(file_get_contents('php://input'), true)) {
         $this->handle([Update::fromResponse($data)]);
     }
 }