class Onceable

Constants

protected DEFAULT_LAST_OBJECT_TOKEN

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.

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.

static void
flushState()

Flush all static state.

Details

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

Create a new onceable instance.

Parameters

string $hash
object|null $object
callable $callable

at line 45
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 61
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 71
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

at line 113
static void flushState()

Flush all static state.

Return Value

void