October\Rain\Support\Traits\Singleton

Source: ~/vendor/october/rain/src/Support/Traits/Singleton.php

Singleton trait.

Allows a simple interface for treating a class as a singleton. Usage: myObject::instance()

Protected properties

protected static $instance

Public methods

public void __clone()

public void __wakeup()

public static void forgetInstance()

Forget this singleton's instance if it exists

public static void instance()

Create a new instance of this singleton.

Protected methods

protected void __construct()

Constructor.

protected void init()

Initialize the singleton free from constructor parameters.