class MontantToStringTransformer implements DataTransformerInterface

deprecated

This class transforms a float into a string with a comma as the decimal point and two decimal places, and vice versa

Methods

void
__construct()

Constructor of class MontantToStringTransformer

string|null
transform(float|null $montant)

Transforms a float into a string with a comma as the decimal point and two decimal places.

float|null
reverseTransform(string $montant)

Transforms a string with a comma as the decimal point and two decimal places into a float.

Details

at line 50
void __construct()

Constructor of class MontantToStringTransformer

Return Value

void

at line 59
string|null transform(float|null $montant)

Transforms a float into a string with a comma as the decimal point and two decimal places.

Parameters

float|null $montant The float to be converted

Return Value

string|null

at line 76
float|null reverseTransform(string $montant)

Transforms a string with a comma as the decimal point and two decimal places into a float.

Parameters

string $montant The string to be converted

Return Value

float|null The float or null if the string is empty