Example #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' => 'schema', 'type' => TType::STRUCT, 'class' => '\\TTableSchema'));
     }
     if (is_array($vals)) {
         if (isset($vals['status'])) {
             $this->status = $vals['status'];
         }
         if (isset($vals['schema'])) {
             $this->schema = $vals['schema'];
         }
     }
 }
Example #2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TCLIService_GetResultSetMetadata_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;
 }