mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Miglioramento della documentazione automatica
Miglioramento del processo di documentazione automatica per il branch gh-pages, con generalizzazione della struttura della classe Auth. Aggiunto sistema per la formattazione automatica del codice sfruttanto PHP CS Fixer (https://github.com/FriendsOfPHP/PHP-CS-Fixer).
This commit is contained in:
@@ -5,10 +5,10 @@ namespace Util;
|
||||
/**
|
||||
* @since 2.3
|
||||
*/
|
||||
class Singleton
|
||||
abstract class Singleton
|
||||
{
|
||||
/** @var \Util\Singleton Oggetto istanziato */
|
||||
protected static $instance = null;
|
||||
protected static $instance = [];
|
||||
|
||||
protected function __construct()
|
||||
{
|
||||
@@ -21,11 +21,13 @@ class Singleton
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (self::$instance === null) {
|
||||
self::$instance = new static();
|
||||
$class = get_called_class(); // late-static-bound class name
|
||||
|
||||
if (self::$instance[$class] === null) {
|
||||
self::$instance[$class] = new static();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
return self::$instance[$class];
|
||||
}
|
||||
|
||||
private function __clone()
|
||||
|
Reference in New Issue
Block a user