Библиотека для cis, online, cms1
This commit is contained in:
commit
3c2e614d87
269 changed files with 39854 additions and 0 deletions
25
core/registry.php
Normal file
25
core/registry.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* http://www.patternsforphp.com/wiki/Registry
|
||||
* http://www.patternsforphp.com/wiki/Singleton
|
||||
* http://www.phppatterns.com/docs/design/the_registry?s=registry
|
||||
*/
|
||||
require_once 'core/settings.php';
|
||||
|
||||
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