Initial project files: BESCMS full source

This commit is contained in:
bes
2026-08-13 23:37:46 +08:00
parent fa6cddb540
commit 2e26f85723
2166 changed files with 396625 additions and 0 deletions
@@ -0,0 +1,54 @@
<?php
class LtStoreMemory implements LtStore
{
protected $stack;
public function add($key, $value)
{
if (isset($this->stack[$key]))
{
return false;
}
else
{
$this->stack[$key] = $value;
return true;
}
}
public function del($key)
{
if (isset($this->stack[$key]))
{
unset($this->stack[$key]);
return true;
}
else
{
return false;
}
}
public function get($key)
{
return isset($this->stack[$key]) ? $this->stack[$key] : false;
}
/**
* key不存在返回false
*
* @return bool
*/
public function update($key, $value)
{
if (!isset($this->stack[$key]))
{
return false;
}
else
{
$this->stack[$key] = $value;
return true;
}
}
}