Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
PhpOffice\PhpSpreadsheet\Calculation\TextData\Format Class Reference

Static Public Member Functions

static DOLLAR (mixed $value=0, mixed $decimals=2)
 
static FIXEDFORMAT (mixed $value, mixed $decimals=2, mixed $noCommas=false)
 FIXED.
 
static NUMBERVALUE (mixed $value='', mixed $decimalSeparator=null, mixed $groupSeparator=null)
 NUMBERVALUE.
 
static TEXTFORMAT (mixed $value, mixed $format)
 TEXT.
 
static VALUE (mixed $value='')
 VALUE.
 
static valueToText (mixed $value, mixed $format=false)
 VALUETOTEXT.
 

Member Function Documentation

◆ FIXEDFORMAT()

static PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::FIXEDFORMAT ( mixed $value,
mixed $decimals = 2,
mixed $noCommas = false )
static

FIXED.

Parameters
mixed$valueThe value to format Or can be an array of values
mixed$decimalsInteger value for the number of decimal places that should be formatted Or can be an array of values
mixed$noCommasBoolean value indicating whether the value should have thousands separators or not Or can be an array of values
Return values
array|stringIf an array of values is passed for either of the arguments, then the returned result will also be an array with matching dimensions

◆ NUMBERVALUE()

static PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::NUMBERVALUE ( mixed $value = '',
mixed $decimalSeparator = null,
mixed $groupSeparator = null )
static

NUMBERVALUE.

Parameters
mixed$valueThe value to format Or can be an array of values
mixed$decimalSeparatorA string with the decimal separator to use, defaults to locale defined value Or can be an array of values
mixed$groupSeparatorA string with the group/thousands separator to use, defaults to locale defined value Or can be an array of values

◆ TEXTFORMAT()

static PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::TEXTFORMAT ( mixed $value,
mixed $format )
static

TEXT.

Parameters
mixed$valueThe value to format Or can be an array of values
mixed$formatA string with the Format mask that should be used Or can be an array of values
Return values
array|stringIf an array of values is passed for either of the arguments, then the returned result will also be an array with matching dimensions

◆ VALUE()

static PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::VALUE ( mixed $value = '')
static

VALUE.

Parameters
mixed$valueValue to check Or can be an array of values
Return values
array|DateTimeInterface|float|int|stringA string if arguments are invalid If an array of values is passed for the argument, then the returned result will also be an array with matching dimensions

◆ valueToText()

static PhpOffice\PhpSpreadsheet\Calculation\TextData\Format::valueToText ( mixed $value,
mixed $format = false )
static

VALUETOTEXT.

Parameters
mixed$valueThe value to format Or can be an array of values
Return values
array|stringIf an array of values is passed for either of the arguments, then the returned result will also be an array with matching dimensions

The documentation for this class was generated from the following file: