ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,48 @@
<?php
namespace Plumrocket\Base\Library\Mobile\Cache;
/**
* Simple cache item (key, value, ttl) that is being
* used by all the detection methods of Mobile Detect class.
*/
class CacheItem
{
/**
* @var string Unique key for the cache record.
*/
protected $key;
/**
* @var bool|null Mobile Detect only needs to store booleans (e.g. "isMobile" => true)
*/
protected $value = null;
protected $ttl = 0;
public function __construct($key, $value = null, $ttl = null)
{
$this->key = $key;
if (!is_null($value)) {
$this->value = $value;
}
$this->ttl = $ttl;
}
public function getKey(): string
{
return $this->key;
}
public function get()
{
return $this->value;
}
public function set($value): void
{
$this->value = $value;
}
public function getTtl(): ?int
{
return $this->ttl;
}
}