Fixes
This commit is contained in:
parent
c276d46db4
commit
d10f3c3c95
File diff suppressed because one or more lines are too long
24
src/Cache.php
Normal file
24
src/Cache.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace PSC\Library\Calc;
|
||||
|
||||
class Cache {
|
||||
private static $instance = null;
|
||||
private $cache = [];
|
||||
|
||||
private function __construct() {}
|
||||
|
||||
public static function getInstance() {
|
||||
if (self::$instance === null) {
|
||||
self::$instance = new Cache();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
public function set($key, $value) {
|
||||
$this->cache[$key] = $value;
|
||||
}
|
||||
|
||||
public function get($key) {
|
||||
return $this->cache[$key] ?? null;
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ use PSC\Library\Calc\Option\Type\Base;
|
||||
use PSC\Library\Calc\Option\Type\Checkbox;
|
||||
use PSC\Library\Calc\Option\Type\Input;
|
||||
use PSC\Library\Calc\Option\Type\Select;
|
||||
use PSC\Library\Calc\Option\Type\ColorDBSelect;
|
||||
|
||||
class Valid
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user