cri2net/php-singleton

PHP Trait Singleton

1.1 2021-06-20 17:36 UTC

This package is auto-updated.

Last update: 2024-11-21 00:58:27 UTC


README

This is php trait for Singleton pattern;

Usage:

<?php

use cri2net\php_singleton\Singleton;

class YourClass
{
    use Singleton;
    
    /*
    code of your class
    */
}

$obj = YourClass::getInstance();