示例#1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'status', 'type' => TType::STRUCT, 'class' => '\\TStatus'), 2 => array('var' => 'delegationToken', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['status'])) {
             $this->status = $vals['status'];
         }
         if (isset($vals['delegationToken'])) {
             $this->delegationToken = $vals['delegationToken'];
         }
     }
 }
示例#2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TCLIService_GetDelegationToken_result');
     if ($this->success !== null) {
         if (!is_object($this->success)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
         $xfer += $this->success->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }