示例#1
0
 public function load($b)
 {
     $this->file_id = $b["file_id"];
     $this->thumb = Api::set($b, "thumb", PhotoSize);
     $this->file_name = Api::pre($b, "file_name", "");
     $this->mime_type = Api::pre($b, "mime_type", "");
     $this->file_size = Api::pre($b, "file_size", 0);
 }
示例#2
0
 public function load($b)
 {
     $this->file_id = $b["file_id"];
     $this->width = $b["width"];
     $this->height = $b["height"];
     $this->thumb = Api::set($b, "thumb", PhotoSize);
     $this->file_size = Api::pre($b, "file_size", 0);
 }
示例#3
0
 public function load($b)
 {
     $this->data = $b;
     $this->id = $b["message_id"];
     $this->from = Api::set($b, "from", "User");
     $this->date = $b["date"];
     $this->chat = new Chat($b["chat"]);
     $this->forward_from = Api::set($b, "forward_from", "User");
     $this->forward_date = isset($b["forward_date"]) ? $b["forward_date"] : -1;
     $this->reply_to_message = Api::set($b, "reply_to_message", "Message");
     $this->getType();
     if ($this->type == "text") {
         $this->exploded = explode(" ", $this->text);
     }
     if ($this->type == "text" && strpos($this->text, "/") === 0) {
         $this->is_command = true;
         $this->text = str_replace("@" . BOT_OFFICIAL_NAME, "", $this->text);
     }
 }