A string whose value is computed lazily by a callback.
- author Nicolas Grekas
Cloneable
- Implements
JsonSerializable Stringable
Methods |
public __sleep() : array |
public __toString() : string |
public static fromCallable(callable|array $callback, ?mixed $arguments) : static
|
public static fromStringable(Stringable|string|int|float|bool $value) : static |
public final static isStringable(?mixed $value) : bool Tells whether the provided value can be cast to string. |
public jsonSerialize() : string |
public final static resolve(Stringable|string|int|float|bool $value) : string Casts scalars and stringable objects to strings.
|
Properties |
private Closure|string $value |
Methods |
private __construct() |
private static getPrettyName(callable $callback) : string |
Methods |
public static fromCallable(callable|array $callback, ?mixed $arguments) : static
|
public static fromStringable(Stringable|string|int|float|bool $value) : static |
private static getPrettyName(callable $callback) : string |
public final static isStringable(?mixed $value) : bool Tells whether the provided value can be cast to string. |
public final static resolve(Stringable|string|int|float|bool $value) : string Casts scalars and stringable objects to strings.
|