Skip to content

UrlPortNumber

Methods

__construct

Returns a PortNumber object.

public __construct(int $value): mixed

Parameters:

Parameter Type Description
$value int

Throws:


Inherited methods

fromNative

Returns a RealNumber object given a PHP native float as parameter.

public static fromNative(): \Qubus\ValueObjects\Number\RealNumber|\Qubus\ValueObjects\ValueObject
  • This method is static.

Throws:


__construct

Returns a Natural object given a PHP native int as parameter.

public __construct(int $value): mixed

Parameters:

Parameter Type Description
$value int

Throws:


toNative

Returns the value of the integer number

public toNative(): float

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

public __toString(): string

toRealNumber

Returns a RealNumber with the value of the IntegerNumber

public toRealNumber(): \Qubus\ValueObjects\Number\RealNumber

Throws:



Automatically generated on 2025-10-13