initial commit

This commit is contained in:
2025-03-12 21:49:22 +01:00
parent bbcf6764cd
commit 3e9115811a
18 changed files with 1617 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace inContact;
/**
* Cecha singleton
*
* @link https://krzysztof-turek.com
*
* @package tylkofotografia.pl
* @version 0.2
*/
trait Singleton
{
private static $instances = [];
protected function __construct()
{
}
final protected function __clone()
{
}
public static function getInstance()
{
$class = get_called_class();
if (!isset($instances[$class])) {
$instances[$class] = new $class;
}
return $instances[$class];
}
}