jrosset/singleton

PHP Trait to implements the singleton design pattern

Maintainers

Package info

git.jrosset.ovh/jrosset/PhpSingleton

Issues

Wiki

Documentation

pkg:composer/jrosset/singleton

Statistics

Installs: 267

Dependents: 1

Suggesters: 0

2.0.0 2024-12-16 09:55 UTC

This package is auto-updated.

Last update: 2026-02-16 12:16:35 UTC


README

PHP Trait to implements the singleton design pattern

Installation

composer require jrosset/singleton

Usage

<?php

use jrosset\Singleton\ISingleton;
use jrosset\Singleton\TSingleton;

class MyClass implements ISingleton {
    use TSingleton;
   
    protected function __construct() {}
}