Once
class Once
Constants
| protected INSTANCE_CONTEXT_KEY |
The context key for the current once instance. |
| protected ENABLED_CONTEXT_KEY |
The context key for the once enabled flag. |
Methods
__construct(WeakMap $values)
Create a new once instance.
static void
enable()
Re-enable the once instance if it was disabled.
static void
disable()
Disable the once instance.
static void
flush()
Flush the once instance.
Details
at line 27
protected
__construct(WeakMap $values)
Create a new once instance.
at line 34
static Once
instance()
Create a new once instance.
at line 42
mixed
value(Onceable $onceable)
Get the value of the given onceable.
at line 66
static void
enable()
Re-enable the once instance if it was disabled.
at line 74
static void
disable()
Disable the once instance.
at line 82
static void
flush()
Flush the once instance.