1
0
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:
Thomas Zilio
2017-08-07 13:07:18 +02:00
parent 15e0b687a4
commit 273372dbdc
28 changed files with 460 additions and 355 deletions

View File

@@ -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()