($class, $spec, $output)
| 727 | } |
| 728 | |
| 729 | protected function _write($class, $spec, $output) |
| 730 | { |
| 731 | $xfer = 0; |
| 732 | $xfer += $output->writeStructBegin($class); |
| 733 | foreach ($spec as $fid => $fspec) { |
| 734 | $var = $fspec['var']; |
| 735 | if ($this->$var !== null) { |
| 736 | $ftype = $fspec['type']; |
| 737 | $xfer += $output->writeFieldBegin($var, $ftype, $fid); |
| 738 | if (isset(TBase::$tmethod[$ftype])) { |
| 739 | $func = 'write'.TBase::$tmethod[$ftype]; |
| 740 | $xfer += $output->$func($this->$var); |
| 741 | } else { |
| 742 | switch ($ftype) { |
| 743 | case TType::STRUCT: |
| 744 | $xfer += $this->$var->write($output); |
| 745 | break; |
| 746 | case TType::MAP: |
| 747 | $xfer += $this->_writeMap($this->$var, $fspec, $output); |
| 748 | break; |
| 749 | case TType::LST: |
| 750 | $xfer += $this->_writeList($this->$var, $fspec, $output, false); |
| 751 | break; |
| 752 | case TType::SET: |
| 753 | $xfer += $this->_writeList($this->$var, $fspec, $output, true); |
| 754 | break; |
| 755 | } |
| 756 | } |
| 757 | $xfer += $output->writeFieldEnd(); |
| 758 | } |
| 759 | } |
| 760 | $xfer += $output->writeFieldStop(); |
| 761 | $xfer += $output->writeStructEnd(); |
| 762 | |
| 763 | return $xfer; |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | class TApplicationException extends TException |
nothing calls this directly
no test coverage detected