MCPcopy Create free account
hub / github.com/apache/thrift / writeFieldHeader

Method writeFieldHeader

lib/php/lib/Protocol/TCompactProtocol.php:212–225  ·  view source on GitHub ↗
($type, $fid)

Source from the content-addressed store, hash-verified

210 }
211
212 public function writeFieldHeader($type, $fid)
213 {
214 $written = 0;
215 $delta = $fid - $this->lastFid;
216 if (0 < $delta && $delta <= 15) {
217 $written = $this->writeUByte(($delta << 4) | $type);
218 } else {
219 $written = $this->writeByte($type) +
220 $this->writeI16($fid);
221 }
222 $this->lastFid = $fid;
223
224 return $written;
225 }
226
227 public function writeFieldBegin($field_name, $field_type, $field_id)
228 {

Callers 3

writeFieldBeginMethod · 0.95
writeBoolMethod · 0.95
testWriteFieldHeaderMethod · 0.80

Calls 3

writeUByteMethod · 0.95
writeByteMethod · 0.95
writeI16Method · 0.95

Tested by 1

testWriteFieldHeaderMethod · 0.64