Once
class Once (View source)
Properties
static protected Once|null | $instance | The current globally used instance. |
|
static protected bool | $enabled | Indicates if the once instance is enabled. |
Methods
void
__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
protected void
__construct(WeakMap $values)
Create a new once instance.
static Once
instance()
Create a new once instance.
mixed
value(Onceable $onceable)
Get the value of the given onceable.
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.