24 lines
480 B
PHP
24 lines
480 B
PHP
<?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;
|
|
}
|
|
}
|