예제 #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 1:
                 if ($ftype == TType::LST) {
                     $this->channels = array();
                     $_size113 = 0;
                     $_etype116 = 0;
                     $xfer += $input->readListBegin($_etype116, $_size113);
                     for ($_i117 = 0; $_i117 < $_size113; ++$_i117) {
                         $elem118 = null;
                         $elem118 = new \RedRoma\Aroma\Channels\AromaChannel();
                         $xfer += $elem118->read($input);
                         $this->channels[] = $elem118;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
예제 #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::STRUCT) {
                     $this->token = new \RedRoma\Aroma\Authentication\AuthenticationToken();
                     $xfer += $this->token->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->event = new \RedRoma\Aroma\Events\Event();
                     $xfer += $this->event->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::MAP) {
                     $this->channels = array();
                     $_size0 = 0;
                     $_ktype1 = 0;
                     $_vtype2 = 0;
                     $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $key5 = new \RedRoma\Aroma\Channels\AromaChannel();
                         $val6 = new \RedRoma\Aroma\User();
                         $key5 = new \RedRoma\Aroma\Channels\AromaChannel();
                         $xfer += $key5->read($input);
                         $val6 = new \RedRoma\Aroma\User();
                         $xfer += $val6->read($input);
                         $this->channels[$key5] = $val6;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }