UrlPortNumber
- Full name:
\Qubus\ValueObjects\Web\UrlPortNumber
- Parent class:
\Qubus\ValueObjects\Number\Natural
- This class implements:
\Qubus\ValueObjects\Web\PortNumber
Methods
__construct
Returns a PortNumber object.
Parameters:
Parameter | Type | Description |
---|---|---|
$value | int |
Throws:
Inherited methods
fromNative
Returns a RealNumber object given a PHP native float as parameter.
- This method is static.
Throws:
__construct
Returns a Natural object given a PHP native int as parameter.
Parameters:
Parameter | Type | Description |
---|---|---|
$value | int |
Throws:
toNative
Returns the value of the integer number
equals
Tells whether two IntegerNumber are equal by comparing their values
public equals(\Qubus\ValueObjects\Number\IntegerNumber|\Qubus\ValueObjects\ValueObject $integer): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$integer | \Qubus\ValueObjects\Number\IntegerNumber|\Qubus\ValueObjects\ValueObject |
toInteger
Returns the integer part of the RealNumber number as a IntegerNumber.
public toInteger(\Qubus\ValueObjects\Number\RoundingMode|null $roundingMode = null): \Qubus\ValueObjects\Number\IntegerNumber
Parameters:
Parameter | Type | Description |
---|---|---|
$roundingMode | \Qubus\ValueObjects\Number\RoundingMode|null | Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. |
Throws:
toNatural
Returns the absolute integer part of the RealNumber number as a Natural.
public toNatural(\Qubus\ValueObjects\Number\RoundingMode|null $roundingMode = null): \Qubus\ValueObjects\Number\Natural
Parameters:
Parameter | Type | Description |
---|---|---|
$roundingMode | \Qubus\ValueObjects\Number\RoundingMode|null | Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. |
Throws:
__toString
Returns the string representation of the real value
toRealNumber
Returns a RealNumber with the value of the IntegerNumber
Throws:
Automatically generated on 2025-10-13