Избавляемся от статических классов и синглтонов

This commit is contained in:
CORP\phedor 2018-03-27 12:23:58 +03:00
parent 77fa3dbd5e
commit 805fb6654d
11 changed files with 177 additions and 309 deletions

View file

@ -1,24 +0,0 @@
<?php
///<reference path="Settings.php" />
/**
* http://www.patternsforphp.com/wiki/Registry
* http://www.patternsforphp.com/wiki/Singleton
* http://www.phppatterns.com/docs/design/the_registry?s=registry
*/
class Registry extends Settings
{
static $instance = null;
/**
*/
static public function getInstance ()
{
if (self::$instance == null) {
self::$instance = new Registry();
}
return self::$instance;
}
}