Home | History | Annotate | Download | only in php

Lines Matching full:"$ value"

173      * @param $value
176 public function putSbyte($offset, $value)
178 self::validateValue(-128, 127, $value, "sbyte");
180 $length = strlen($value);
182 return $this->_buffer[$offset] = $value;
187 * @param $value
190 public function putByte($offset, $value)
192 self::validateValue(0, 255, $value, "byte");
194 $length = strlen($value);
196 return $this->_buffer[$offset] = $value;
201 * @param $value
203 public function put($offset, $value)
205 $length = strlen($value);
208 $this->_buffer[$offset + $i] = $value[$i];
214 * @param $value
216 public function putShort($offset, $value)
218 self::validateValue(-32768, 32767, $value, "short");
221 $this->writeLittleEndian($offset, 2, $value);
226 * @param $value
228 public function putUshort($offset, $value)
230 self::validateValue(0, 65535, $value, "short");
233 $this->writeLittleEndian($offset, 2, $value);
238 * @param $value
240 public function putInt($offset, $value)
244 self::validateValue(-2147483648, 2147483647, $value, "int");
247 $this->writeLittleEndian($offset, 4, $value);
252 * @param $value
254 public function putUint($offset, $value)
258 self::validateValue(0, 4294967295, $value, "uint", " php has big numbers limitation. check your PHP_INT_MAX");
261 $this->writeLittleEndian($offset, 4, $value);
266 * @param $value
268 public function putLong($offset, $value)
271 self::validateValue(~PHP_INT_MAX, PHP_INT_MAX, $value, "long", " php has big numbers limitation. check your PHP_INT_MAX");
274 $this->writeLittleEndian($offset, 8, $value);
279 * @param $value
281 public function putUlong($offset, $value)
284 self::validateValue(0, PHP_INT_MAX, $value, "long", " php has big numbers limitation. check your PHP_INT_MAX");
287 $this->writeLittleEndian($offset, 8, $value);
292 * @param $value
294 public function putFloat($offset, $value)
298 $floathelper = pack("f", $value);
305 * @param $value
307 public function putDouble($offset, $value)
311 $floathelper = pack("d", $value);
466 private static function convertHelper($type, $value, $value2 = null) {
474 $inthelper = pack("V", $value);
479 $inthelper = pack("VV", $value, $value2);
488 private static function validateValue($min, $max, $value, $type, $additional_notes = "") {
489 if(!($min <= $value && $value <= $max)) {
490 throw new \InvalidArgumentException(sprintf("bad number %s for type %s.%s", $value, $type, $additional_notes));