Exemplo n.º 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();
                     $_size249 = 0;
                     $_etype252 = 0;
                     $xfer += $input->readListBegin($_etype252, $_size249);
                     for ($_i253 = 0; $_i253 < $_size249; ++$_i253) {
                         $elem254 = null;
                         $elem254 = new TRowResult();
                         $xfer += $elem254->read($input);
                         $this->success[] = $elem254;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->io = new IOError();
                     $xfer += $this->io->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->ia = new IllegalArgument();
                     $xfer += $this->ia->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Exemplo 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::MAP, 'ktype' => TType::STRING, 'vtype' => TType::STRUCT, 'key' => array('type' => TType::STRING), 'val' => array('type' => TType::STRUCT, 'class' => 'TCell')));
     }
     if (is_array($vals)) {
         if (isset($vals['row'])) {
             $this->row = $vals['row'];
         }
         if (isset($vals['columns'])) {
             $this->columns = $vals['columns'];
         }
     }
 }