Beispiel #1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('THBaseService_increment_args');
     if ($this->table !== null) {
         $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
         $xfer += $output->writeString($this->table);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->tincrement !== null) {
         if (!is_object($this->tincrement)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('tincrement', TType::STRUCT, 2);
         $xfer += $this->tincrement->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Beispiel #2
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->increments = array();
                     $_size376 = 0;
                     $_etype379 = 0;
                     $xfer += $input->readListBegin($_etype379, $_size376);
                     for ($_i380 = 0; $_i380 < $_size376; ++$_i380) {
                         $elem381 = null;
                         $elem381 = new TIncrement();
                         $xfer += $elem381->read($input);
                         $this->increments[] = $elem381;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Beispiel #3
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'table', 'type' => TType::STRING), 2 => array('var' => 'row', 'type' => TType::STRING), 3 => array('var' => 'column', 'type' => TType::STRING), 4 => array('var' => 'ammount', 'type' => TType::I64));
     }
     if (is_array($vals)) {
         if (isset($vals['table'])) {
             $this->table = $vals['table'];
         }
         if (isset($vals['row'])) {
             $this->row = $vals['row'];
         }
         if (isset($vals['column'])) {
             $this->column = $vals['column'];
         }
         if (isset($vals['ammount'])) {
             $this->ammount = $vals['ammount'];
         }
     }
 }
Beispiel #4
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' => '\\TColumnIncrement')), 3 => array('var' => 'writeToWal', 'type' => TType::BOOL));
     }
     if (is_array($vals)) {
         if (isset($vals['row'])) {
             $this->row = $vals['row'];
         }
         if (isset($vals['columns'])) {
             $this->columns = $vals['columns'];
         }
         if (isset($vals['writeToWal'])) {
             $this->writeToWal = $vals['writeToWal'];
         }
     }
 }
Beispiel #5
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' => '\\TColumnIncrement')), 4 => array('var' => 'attributes', 'type' => TType::MAP, 'ktype' => TType::STRING, 'vtype' => TType::STRING, 'key' => array('type' => TType::STRING), 'val' => array('type' => TType::STRING)), 5 => array('var' => 'durability', 'type' => TType::I32), 6 => 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'];
         }
     }
 }