Exemplo n.º 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Hbase_scannerOpenWithScan_args');
     if ($this->tableName !== null) {
         $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1);
         $xfer += $output->writeString($this->tableName);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->scan !== null) {
         if (!is_object($this->scan)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('scan', TType::STRUCT, 2);
         $xfer += $this->scan->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->attributes !== null) {
         if (!is_array($this->attributes)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3);
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes));
         foreach ($this->attributes as $kiter420 => $viter421) {
             $xfer += $output->writeString($kiter420);
             $xfer += $output->writeString($viter421);
         }
         $output->writeMapEnd();
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }