class PercentToLocalizedStringTransformer implements DataTransformerInterface
Transforms between a normalized format (integer or float) and a percentage value.
Constants
Methods
|
__construct(int $scale = null, string $type = null) Constructor. |
|
mixed |
transform(mixed $value) Transforms between a normalized format (integer or float) into a percentage value. |
|
mixed |
reverseTransform(mixed $value) Transforms between a percentage value into a normalized format (integer or float). |
|
Details
__construct(int $scale = null, string $type = null)
Constructor.
Parameters
int |
$scale |
The scale |
string |
$type |
One of the supported types |
Exceptions
See also
self::$types |
for a list of supported types |
Transforms between a normalized format (integer or float) into a percentage value.
Parameters
mixed |
$value |
The value in the original representation |
Return Value
mixed |
The value in the transformed representation |
Exceptions
Transforms between a percentage value into a normalized format (integer or float).
Parameters
mixed |
$value |
The value in the transformed representation |
Return Value
mixed |
The value in the original representation |
Exceptions