Quantity
in package
implements
QuantityInterface
FinalYes
Quantity information.
Table of Contents
Interfaces
- QuantityInterface
- Quantity information.
Properties
- $quantity : BigDecimal
- Quantity.
- $unit : UnitInterface
- Unit in which the quantity is measured.
Methods
- __construct() : mixed
- getQuantity() : BigDecimal
- Returns the quantity.
- getUnit() : UnitInterface
- Returns the unit in which the quantity is measured.
Properties
$quantity
Quantity.
private
BigDecimal
$quantity
$unit
Unit in which the quantity is measured.
private
UnitInterface
$unit
Methods
__construct()
public
__construct(BigDecimal $quantity, UnitInterface $unit) : mixed
Parameters
- $quantity : BigDecimal
-
quantity
- $unit : UnitInterface
-
unit
getQuantity()
Returns the quantity.
public
getQuantity() : BigDecimal
Tags
Return values
BigDecimal —quantity
getUnit()
Returns the unit in which the quantity is measured.
public
getUnit() : UnitInterface