Esempio n. 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('THBaseService_append_args');
     if ($this->table !== null) {
         $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
         $xfer += $output->writeString($this->table);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->tappend !== null) {
         if (!is_object($this->tappend)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('tappend', TType::STRUCT, 2);
         $xfer += $this->tappend->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Esempio n. 2
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'row', 'type' => TType::STRING), 2 => array('var' => 'columns', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => '\\TColumnValue')), 3 => array('var' => 'attributes', 'type' => TType::MAP, 'ktype' => TType::STRING, 'vtype' => TType::STRING, 'key' => array('type' => TType::STRING), 'val' => array('type' => TType::STRING)), 4 => array('var' => 'durability', 'type' => TType::I32), 5 => array('var' => 'cellVisibility', 'type' => TType::STRUCT, 'class' => '\\TCellVisibility'));
     }
     if (is_array($vals)) {
         if (isset($vals['row'])) {
             $this->row = $vals['row'];
         }
         if (isset($vals['columns'])) {
             $this->columns = $vals['columns'];
         }
         if (isset($vals['attributes'])) {
             $this->attributes = $vals['attributes'];
         }
         if (isset($vals['durability'])) {
             $this->durability = $vals['durability'];
         }
         if (isset($vals['cellVisibility'])) {
             $this->cellVisibility = $vals['cellVisibility'];
         }
     }
 }