Copied!

UnitConverterInterface

UnitConverterInterface.php : 15
Interface

Methods

publicconvert()

UnitConverterInterface.php : 31
public convert(T $sourceValue, UnitInterface $targetUnit) : T

Parameters

Name Type Default value Description
$sourceValue T - -
$targetUnit UnitInterface - -

Return values

T

Tags
Throws
InvalidArgumentException

publicsupports()

UnitConverterInterface.php : 17
public supports(ValueInterface $sourceValue, UnitInterface $toUnit) : bool

Parameters

Name Type Default value Description
$sourceValue ValueInterface - -
$toUnit UnitInterface - -

Return values

bool