dev-master
9999999-devSingleton Contract or Interface
MIT
The Requires
- php >5.4.0
The Development Requires
by Nino Paolo Amarillento
interface contract singleton php-daddy
Wallogit.com
2017 © Pedro Peláez
Singleton Contract or Interface
$ composer require "php-daddy/contract-singleton":"*"
<?php
use PhpDaddy\Contract\Singleton\AbstractSingleton;
class SingletonChild extends AbstractSingleton
{
}
$obj = new SingletonChild::getInstance();
See example directory, or by:, (*2)
<?php
use PhpDaddy\Contract\Singleton\Singleton;
use PhpDaddy\Contract\Singleton\SingletonTrait;
class SingletonStub implements Singleton
{
use SingletonTrait;
}
$obj- new SingletonStub::getInstance();
Singleton Contract or Interface
MIT
interface contract singleton php-daddy