class Onceable (View source)

Methods

void
__construct(string $hash, object|null $object, callable $callable)

Create a new onceable instance.

static Onceable|null
tryFromTrace(array $trace, callable $callable)

Tries to create a new onceable instance from the given trace.

static object|null
objectFromTrace(array $trace)

Computes the object of the onceable from the given trace, if any.

static string|null
hashFromTrace(array $trace, callable $callable)

Computes the hash of the onceable from the given trace.

Details

void __construct(string $hash, object|null $object, callable $callable)

Create a new onceable instance.

Parameters

string $hash
object|null $object
callable $callable

Return Value

void

static Onceable|null tryFromTrace(array $trace, callable $callable)

Tries to create a new onceable instance from the given trace.

Parameters

array $trace
callable $callable

Return Value

Onceable|null

static protected object|null objectFromTrace(array $trace)

Computes the object of the onceable from the given trace, if any.

Parameters

array $trace

Return Value

object|null

static protected string|null hashFromTrace(array $trace, callable $callable)

Computes the hash of the onceable from the given trace.

Parameters

array $trace
callable $callable

Return Value

string|null