class Onceable

Methods

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

Create a new onceable instance.

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

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

array
objects()

Get the objects used by the callable, which are hashed by their identity.

static object|null
objectFromTrace(array $trace)

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

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

Compute the hash of the onceable from the given trace.

Details

at line 18
__construct(string $hash, object|null $object, callable $callable)

Create a new onceable instance.

Parameters

string $hash
object|null $object
callable $callable

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

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

Parameters

array $trace
callable $callable

Return Value

Onceable|null

at line 46
array objects()

Get the objects used by the callable, which are hashed by their identity.

Return Value

array

at line 68
static protected object|null objectFromTrace(array $trace)

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

Parameters

array $trace

Return Value

object|null

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

Compute the hash of the onceable from the given trace.

Parameters

array $trace
callable $callable

Return Value

string|null