API reference / Quittio \ Core \ View
FormattedValue
final readonly class in quittio/core · implements JsonSerializable, Stringable
Quittio\Core\View\FormattedValue · Source
A value for templates: formatted for display and available in raw form. Casting to string returns the formatted value, so {{ $value }} prints it.
Properties#
| Property | Type | Description |
|---|---|---|
$formatted readonly | string | |
$raw readonly | mixed |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->__toString() | |
->jsonSerialize() |
__construct()#
public function __construct(string $formatted, mixed $raw = null)| Parameter | Type | Description |
|---|---|---|
$formatted | string | |
$raw | mixed = null |
__toString()#
public function __toString(): string- Returns
string
jsonSerialize()#
public function jsonSerialize(): string- Returns
string