Formatter
extends BaseFormatter
in package
Table of Contents
Methods
- toFormattedString() : string
- Convert a value in a pre-defined format to a PHP string.
- adjustSeparators() : string
- stripQuotes() : string
Methods
toFormattedString()
Convert a value in a pre-defined format to a PHP string.
public
static toFormattedString(null|array<string|int, mixed>|bool|float|int|RichText|string $value, string $format[, null|array<string|int, mixed>|callable $callBack = null ]) : string
Parameters
- $value : null|array<string|int, mixed>|bool|float|int|RichText|string
-
Value to format
- $format : string
-
Format code: see = self::FORMAT_* for predefined values; or can be any valid MS Excel custom format string
- $callBack : null|array<string|int, mixed>|callable = null
-
Callback function for additional formatting of string
Return values
string —Formatted string
adjustSeparators()
protected
static adjustSeparators(string $value) : string
Parameters
- $value : string
Return values
stringstripQuotes()
protected
static stripQuotes(string $format) : string
Parameters
- $format : string