This commit is contained in:
Thomas Peterson 2025-06-07 14:11:28 +02:00
parent c276d46db4
commit d10f3c3c95
3 changed files with 26 additions and 1 deletions

File diff suppressed because one or more lines are too long

24
src/Cache.php Normal file
View 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;
}
}

View File

@ -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
{