public function ParagonIE_Sodium_Core32_Curve25519_Fe::offsetSet in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php \ParagonIE_Sodium_Core32_Curve25519_Fe::offsetSet()
@internal You should not use this directly from another application
Parameters
mixed $offset:
mixed $value:
Return value
void
Throws
SodiumException
TypeError
File
- vendor/
paragonie/ sodium_compat/ src/ Core32/ Curve25519/ Fe.php, line 107
Class
- ParagonIE_Sodium_Core32_Curve25519_Fe
- Class ParagonIE_Sodium_Core32_Curve25519_Fe
Code
public function offsetSet($offset, $value) {
if (!$value instanceof ParagonIE_Sodium_Core32_Int32) {
throw new InvalidArgumentException('Expected an instance of ParagonIE_Sodium_Core32_Int32');
}
if (is_null($offset)) {
$this->container[] = $value;
}
else {
ParagonIE_Sodium_Core32_Util::declareScalarType($offset, 'int', 1);
$this->container[(int) $offset] = $value;
}
}