Currency
Less than 1 minute
Currency
class Currency extends \Hazaar\Model\Attribute\BaseExtends: Hazaar\Model\Attribute\Base
Properties
currency
public string $currencyType: string
Methods
__construct
Constructor for the Currency attribute.
public __construct(?string $currency): voidParameters
| Parameter | Type | Description |
|---|---|---|
$currency | string | the currency (or country) code to convert the property value to, eg: 'USD'. If omitted, Money::getDefaultCurrency() is used at evaluation time. |
evaluate
Normalises the property value into a Money instance in the target currency.
public evaluate(mixed $propertyValue, \ReflectionProperty $property): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$propertyValue | mixed | the value of the property to convert (passed by reference) |
$property | ReflectionProperty | the reflection property instance for metadata (passed by reference) |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000