Scientific extends NumberBase implements Wizard
Interfaces, Classes and Traits
Table of Contents
- MAX_DECIMALS = 30
- $decimals : int
- $fullLocale : string|null
- $locale : string|null
- $localeFormat : string|null
- __construct() : mixed
- __toString() : string
- format() : string
- setDecimals() : void
- setLocale() : void
- Setting a locale will override any settings defined in this class.
- getLocaleFormat() : string
- Stub: should be implemented as a concrete method in concrete wizards.
- validateLocale() : string
Constants
MAX_DECIMALS
protected
mixed
MAX_DECIMALS
= 30
Properties
$decimals
protected
int
$decimals
= 2
$fullLocale
protected
string|null
$fullLocale
= null
$locale
protected
string|null
$locale
= null
$localeFormat
protected
string|null
$localeFormat
= null
Methods
__construct()
public
__construct([int $decimals = 2 ][, string|null $locale = null ]) : mixed
Parameters
- $decimals : int = 2
-
number of decimal places to display, in the range 0-30
- $locale : string|null = null
-
Set the locale for the scientific format; or leave as the default null. Locale has no effect for Scientific Format values, and is retained here for compatibility with the other Wizards. If provided, Locale values must be a valid formatted locale string (e.g. 'en-GB', 'fr', uz-Arab-AF).
Tags
Return values
mixed —__toString()
public
__toString() : string
Return values
string —format()
public
format() : string
Return values
string —setDecimals()
public
setDecimals([int $decimals = 2 ]) : void
Parameters
- $decimals : int = 2
Return values
void —setLocale()
Setting a locale will override any settings defined in this class.
public
setLocale([string|null $locale = null ]) : void
Parameters
- $locale : string|null = null
Tags
Return values
void —getLocaleFormat()
Stub: should be implemented as a concrete method in concrete wizards.
protected
getLocaleFormat() : string
Return values
string —validateLocale()
private
validateLocale(string $locale) : string
Parameters
- $locale : string