Skip to content

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#

PropertyTypeDescription
$formatted readonlystring
$raw readonlymixed

Methods#

MethodDescription
->__construct()
->__toString()
->jsonSerialize()Encodes the value as its formatted string, like casting it to string.

__construct()#

public function __construct(string $formatted, mixed $raw = null)
ParameterTypeDescription
$formattedstring
$rawmixed = null

__toString()#

public function __toString(): string
Returns
string

jsonSerialize()#

public function jsonSerialize(): string

Encodes the value as its formatted string, like casting it to string.

Returns
string

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.