Регистр файлов
This commit is contained in:
parent
4fd0187ea6
commit
c8958cbee0
83 changed files with 25 additions and 53 deletions
24
src/Registry.php
Normal file
24
src/Registry.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue