Integer
A value object representing an integer
This class exists for type-safety purposes, to ensure that integers returned from ramsey/uuid methods as strings are truly integers and not some other kind of string.
To support large integers beyond PHP_INT_MAX and PHP_INT_MIN on both 64-bit and 32-bit systems, we store the integers as strings.
- Full name:
\Ramsey\Uuid\Type\Integer
- This class is marked as final and can't be subclassed
- This class implements:
\Ramsey\Uuid\Type\NumberInterface
- This class is a Final class
Properties
value
isNegative
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$value |
float|int|string|self |
isNegative
Returns true if this number is less than zero
toString
__toString
jsonSerialize
serialize
__serialize
unserialize
Constructs the object from a serialized string representation
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string | The serialized string representation of the object |
__unserialize
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
array{string?: string} |
prepareValue
Parameters:
Parameter | Type | Description |
---|---|---|
$value |
float|int|string |
Automatically generated on 2025-03-18