Exemplo n.º 1
0
 /**
  * 快速设定回应协议
  * @param string $field 字段名
  * @param string $data 数据
  * @return void
  */
 public function set($field, $data)
 {
     if (Server::isTask()) {
         return;
     }
     if ($this->simpleResponseProto == null) {
         $this->simpleResponseProto = $this->parser->makeResponseProto($this->request->proto());
         if ($this->simpleResponseProto == null) {
             return;
         }
     }
     $this->parser->set($this->simpleResponseProto, $field, $data);
 }