Example #1
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 0:
                 if ($ftype == TType::LST) {
                     $this->success = array();
                     $_size193 = 0;
                     $_etype196 = 0;
                     $xfer += $input->readListBegin($_etype196, $_size193);
                     for ($_i197 = 0; $_i197 < $_size193; ++$_i197) {
                         $elem198 = null;
                         $elem198 = new Hypertable_ThriftGen_TableSplit();
                         $xfer += $elem198->read($input);
                         $this->success[] = $elem198;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->e = new Hypertable_ThriftGen_ClientException();
                     $xfer += $this->e->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Example #2
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'start_row', 'type' => TType::STRING), 2 => array('var' => 'end_row', 'type' => TType::STRING), 3 => array('var' => 'location', 'type' => TType::STRING), 4 => array('var' => 'ip_address', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['start_row'])) {
             $this->start_row = $vals['start_row'];
         }
         if (isset($vals['end_row'])) {
             $this->end_row = $vals['end_row'];
         }
         if (isset($vals['location'])) {
             $this->location = $vals['location'];
         }
         if (isset($vals['ip_address'])) {
             $this->ip_address = $vals['ip_address'];
         }
     }
 }