Add CacheLayer singleton class
This commit is contained in:
parent
d1c62486c8
commit
4bcec33f84
1 changed files with 18 additions and 0 deletions
18
src/Socialbox/Classes/CacheLayer.php
Normal file
18
src/Socialbox/Classes/CacheLayer.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Socialbox\Classes;
|
||||||
|
|
||||||
|
class CacheLayer
|
||||||
|
{
|
||||||
|
private static CacheLayer $instance;
|
||||||
|
|
||||||
|
public static function getInstance(): CacheLayer
|
||||||
|
{
|
||||||
|
if (!isset(self::$instance))
|
||||||
|
{
|
||||||
|
self::$instance = new CacheLayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$instance;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue