コード例 #1
0
ファイル: Types.php プロジェクト: prongs/apache-hive
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'status', 'type' => TType::STRUCT, 'class' => '\\TStatus'), 2 => array('var' => 'operationHandle', 'type' => TType::STRUCT, 'class' => '\\TOperationHandle'));
     }
     if (is_array($vals)) {
         if (isset($vals['status'])) {
             $this->status = $vals['status'];
         }
         if (isset($vals['operationHandle'])) {
             $this->operationHandle = $vals['operationHandle'];
         }
     }
 }
コード例 #2
0
ファイル: TCLIService.php プロジェクト: zhaorongsheng/hive
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TCLIService_GetColumns_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;
 }