Format
in package
Uses
StaticTrait
This class is for format a string For example: format a number or a date.
Table of Contents
- $instance : mixed
- Instance object.
- __callStatic() : mixed
- Add support for magic static method calls.
- _i() : mixed
- _instance() : mixed
- colorize() : string
- instance() : mixed
- Set/get a instance of object.
- numeral() : string
- relativedate() : string
- uncolorize() : string
Properties
$instance
Instance object.
protected
static mixed
$instance
Methods
__callStatic()
Add support for magic static method calls.
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
Return values
mixed —the returned value from the resolved method
_i()
public
static _i() : mixed
Return values
mixed —_instance()
public
static _instance() : mixed
Return values
mixed —colorize()
public
static colorize(string $text) : string
Parameters
- $text : string
Return values
string —instance()
Set/get a instance of object.
public
static instance(mixed $instance) : mixed
Parameters
- $instance : mixed
Return values
mixed —numeral()
public
static numeral(mixed $number, int $decimals = 0, string|null $dec_point = null, string|null $thousands_sep = null) : string
Parameters
- $number : mixed
- $decimals = 0 : int
- $dec_point = null : string|null
- $thousands_sep = null : string|null
Return values
string —relativedate()
public
static relativedate(mixed $indate, mixed $default) : string
Parameters
- $indate : mixed
- $default : mixed
Return values
string —uncolorize()
public
static uncolorize(string $string) : string
Parameters
- $string : string