class NumberFunction

This class provides some money functions for the expression parser.

Properties

static mixed|null $decimalPoint
static mixed|null $groupingSeparator
static mixed|null $groupingSize
static mixed|null $fractionDigit

Methods

static mixed
toString(mixed $number)

function toString

static bool
toNumber(string $number)

function toNumber

static bool
format(string $number)

function format

static bool
isNumber(string $number)

function isNumber

static mixed
formatNumber(mixed $number, mixed $decimals = 0, mixed $dec_point = ".", mixed $thousands_sep = ",", mixed $thousands_size = 3)

function formatNumber

static void
init()

function init

Details

at line 83
static mixed toString(mixed $number)

function toString

Parameters

mixed $number

Return Value

mixed

at line 102
static bool toNumber(string $number)

function toNumber

Parameters

string $number

Return Value

bool

at line 116
static bool format(string $number)

function format

Parameters

string $number

Return Value

bool

at line 131
static bool isNumber(string $number)

function isNumber

determines if number is true

Parameters

string $number

Return Value

bool the value of number

at line 149
static mixed formatNumber(mixed $number, mixed $decimals = 0, mixed $dec_point = ".", mixed $thousands_sep = ",", mixed $thousands_size = 3)

function formatNumber

Parameters

mixed $number
mixed $decimals (default: 0)
mixed $dec_point (default: ".")
mixed $thousands_sep (default: ",")
mixed $thousands_size (default: 3)

Return Value

mixed

at line 167
static protected void init()

function init

Return Value

void