Copied!

A string whose value is computed lazily by a callback.

Cloneable
Methods
public __sleep() : array
public __toString() : string
public static fromCallable(callable|array $callback, ?mixed $arguments) : static
 
  • param callable|array $callback A callable or a [Closure, method] lazy-callable
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.

  • throws \TypeError When the provided value is not stringable
Properties
private Closure|string $value
Methods
private __construct()
private static getPrettyName(callable $callback) : string
Methods
public static fromCallable(callable|array $callback, ?mixed $arguments) : static
 
  • param callable|array $callback A callable or a [Closure, method] lazy-callable
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.

  • throws \TypeError When the provided value is not stringable
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration