init memory model

This commit is contained in:
yggverse 2024-04-09 11:25:22 +03:00
parent d40d95528d
commit 95abe81547

View file

@ -6,6 +6,23 @@ namespace Yggverse\Yoda\Model;
class Memory class Memory
{ {
private array $_memory = [];
public function __construct() 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;
}
} }