cri2net/php-singleton

PHP Trait Singleton

1.1 2021-06-20 17:36 UTC

This package is auto-updated.

Last update: 2024-05-20 23:56:21 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();