diff --git a/src/Model/Memory.php b/src/Model/Memory.php index f83d906..ddff0ad 100644 --- a/src/Model/Memory.php +++ b/src/Model/Memory.php @@ -6,6 +6,23 @@ namespace Yggverse\Yoda\Model; class Memory { + private array $_memory = []; + public function __construct() {} + + public function set(string $key, mixed $value): void + { + $this->_memory[$key] = $value; + } + + public function get(string $key): mixed + { + if (isset($this->_memory[$key])) + { + return $this->_memory[$key]; + } + + return null; + } } \ No newline at end of file