CacheItem
in package
Simple cache item (key, value, ttl) that is being used by all the detection methods of Mobile Detect class.
Table of Contents
Properties
Methods
- __construct() : mixed
- get() : string|bool
- getKey() : string
- getTtl() : int|null
- set() : void
Properties
$key
protected
string
$key
Unique key for the cache record.
$ttl
protected
int|null
$ttl
= 0
$value
protected
bool|null
$value
= null
Mobile Detect only needs to store booleans (e.g. "isMobile" => true)
Methods
__construct()
public
__construct(mixed $key[, mixed $value = null ][, mixed $ttl = null ]) : mixed
Parameters
- $key : mixed
- $value : mixed = null
- $ttl : mixed = null
get()
public
get() : string|bool
Return values
string|boolgetKey()
public
getKey() : string
Return values
stringgetTtl()
public
getTtl() : int|null
Return values
int|nullset()
public
set(mixed $value) : void
Parameters
- $value : mixed