Beispiel #1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'status_code', 'type' => TType::I32), 2 => array('var' => 'error_msgs', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array('type' => TType::STRING)));
     }
     if (is_array($vals)) {
         if (isset($vals['status_code'])) {
             $this->status_code = $vals['status_code'];
         }
         if (isset($vals['error_msgs'])) {
             $this->error_msgs = $vals['error_msgs'];
         }
     }
 }
Beispiel #2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TRenewDelegationTokenResp');
     if ($this->status !== null) {
         if (!is_object($this->status)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('status', TType::STRUCT, 1);
         $xfer += $this->status->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'statusCode', 'type' => TType::I32), 2 => array('var' => 'infoMessages', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array('type' => TType::STRING)), 3 => array('var' => 'sqlState', 'type' => TType::STRING), 4 => array('var' => 'errorCode', 'type' => TType::I32), 5 => array('var' => 'errorMessage', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['statusCode'])) {
             $this->statusCode = $vals['statusCode'];
         }
         if (isset($vals['infoMessages'])) {
             $this->infoMessages = $vals['infoMessages'];
         }
         if (isset($vals['sqlState'])) {
             $this->sqlState = $vals['sqlState'];
         }
         if (isset($vals['errorCode'])) {
             $this->errorCode = $vals['errorCode'];
         }
         if (isset($vals['errorMessage'])) {
             $this->errorMessage = $vals['errorMessage'];
         }
     }
 }