Closed 1mahdimf closed 2 years ago
@1mahdimf Please give me an example for writing in the package documention
use WPTrait\Utils;
/**
* Class which uses singleton trait.
*/
class SingletonClass {
use Singleton;
}
// To get the instance of the class.
$instance = SingletonClass::instance();
Singleton Design Pattern