DivisaTools
extends NumberTools
in package
DivisaTools give us some basic and common methods for currency numbers.
Tags
Table of Contents
- $selectedDivisa : Divisa
- __construct() : mixed
- DivisaTools constructor.
- convert() : float
- Convert the amount form currency1 to currency2.
- findDivisa() : mixed
- Finds a coddivisa and uses it as selected currency.
- format() : string
- Returns the value of the formatted currency.
- getSymbol() : string
Properties
$selectedDivisa
private
static Divisa
$selectedDivisa
Methods
__construct()
DivisaTools constructor.
public
__construct() : mixed
Return values
mixed —convert()
Convert the amount form currency1 to currency2.
public
static convert(float $amount, string $coddivisa1, string $coddivisa2) : float
Parameters
- $amount : float
- $coddivisa1 : string
- $coddivisa2 : string
Return values
float —findDivisa()
Finds a coddivisa and uses it as selected currency.
public
findDivisa(object $model) : mixed
Parameters
- $model : object
Return values
mixed —format()
Returns the value of the formatted currency.
public
static format(mixed $number[, mixed $decimals = FS_NF0 ][, string $decoration = 'symbol' ]) : string
Parameters
- $number : mixed
- $decimals : mixed = FS_NF0
- $decoration : string = 'symbol'
Return values
string —getSymbol()
public
static getSymbol() : string