Decimal
A value object representing a decimal
This class exists for type-safety purposes, to ensure that decimals returned from ramsey/uuid methods as strings are truly decimals and not some other kind of string.
To support values as true decimals and not as floats or doubles, we store the decimals as strings.
- Full name:
\Ramsey\Uuid\Type\Decimal
- 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} |
Automatically generated on 2025-03-18