alireaza/singleton

The Singleton.

Fund package maintenance!
Linkedin

1.2.0 2022-03-05 00:47 UTC

This package is auto-updated.

Last update: 2023-01-05 02:48:03 UTC


README

Install

Via Composer

$ composer require alireaza/singleton

Usage

use AliReaza\Singleton\Singleton;

class WhoAmI extends Singleton
{
    public string $name = 'What\'s my name?';
}

$who = WhoAmI::getInstance();
$who->name = 'AliReaza';

$alireaza = WhoAmI::getInstance();
echo $alireaza->name; // AliReaza

License

The MIT License (MIT). Please see License File for more information.