Browse Source

init memory model

PHP-GTK3
yggverse 8 months ago
parent
commit
95abe81547
  1. 17
      src/Model/Memory.php

17
src/Model/Memory.php

@ -6,6 +6,23 @@ namespace Yggverse\Yoda\Model; @@ -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;
}
}
Loading…
Cancel
Save