@@ 79-88 (lines=10) @@ | ||
76 | * |
|
77 | * @return int |
|
78 | */ |
|
79 | public function writeSignedInteger16($data) |
|
80 | { |
|
81 | if ($this->getByteOrder() !== ByteOrder::MACHINE_ENDIAN |
|
82 | && $this->getByteOrder() !== $this->getMachineByteOrder() |
|
83 | ) { |
|
84 | $data = strrev($data); |
|
85 | } |
|
86 | ||
87 | return $this->write(pack('s', $data)); |
|
88 | } |
|
89 | ||
90 | /** |
|
91 | * Write unsigned 32-bit integer (long) data to the stream |
|
@@ 120-129 (lines=10) @@ | ||
117 | * |
|
118 | * @return int |
|
119 | */ |
|
120 | public function writeSignedInteger32($data) |
|
121 | { |
|
122 | if ($this->getByteOrder() !== ByteOrder::MACHINE_ENDIAN |
|
123 | && $this->getByteOrder() !== $this->getMachineByteOrder() |
|
124 | ) { |
|
125 | $data = strrev($data); |
|
126 | } |
|
127 | ||
128 | return $this->write(pack('l', $data)); |
|
129 | } |
|
130 | ||
131 | /** |
|
132 | * Write unsigned 64-bit integer (long long) data to the stream |
|
@@ 161-170 (lines=10) @@ | ||
158 | * |
|
159 | * @return int |
|
160 | */ |
|
161 | public function writeSignedInteger64($data) |
|
162 | { |
|
163 | if ($this->getByteOrder() !== ByteOrder::MACHINE_ENDIAN |
|
164 | && $this->getByteOrder() !== $this->getMachineByteOrder() |
|
165 | ) { |
|
166 | $data = strrev($data); |
|
167 | } |
|
168 | ||
169 | return $this->write(pack('q', $data)); |
|
170 | } |
|
171 | } |
|
172 |