public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'operationHandle', 'type' => TType::STRUCT, 'class' => '\\TOperationHandle'), 2 => array('var' => 'orientation', 'type' => TType::I32), 3 => array('var' => 'maxRows', 'type' => TType::I64), 4 => array('var' => 'fetchType', 'type' => TType::I16)); } if (is_array($vals)) { if (isset($vals['operationHandle'])) { $this->operationHandle = $vals['operationHandle']; } if (isset($vals['orientation'])) { $this->orientation = $vals['orientation']; } if (isset($vals['maxRows'])) { $this->maxRows = $vals['maxRows']; } if (isset($vals['fetchType'])) { $this->fetchType = $vals['fetchType']; } } }
public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('TCLIService_FetchResults_args'); if ($this->req !== null) { if (!is_object($this->req)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); $xfer += $this->req->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }