Пример #1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'status', 'type' => TType::STRUCT, 'class' => '\\TStatus'));
     }
     if (is_array($vals)) {
         if (isset($vals['status'])) {
             $this->status = $vals['status'];
         }
     }
 }
Пример #2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TCLIService_CloseOperation_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;
 }