public static function cookie($strKey, $blnDecodeEntities = false)
{
if (!isset($_COOKIE[$strKey])) {
return null;
}
$strCacheKey = $blnDecodeEntities ? 'cookieDecoded' : 'cookieEncoded';
if (!isset(static::$arrCache[$strCacheKey][$strKey])) {
$varValue = $_COOKIE[$strKey];
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue, true);
$varValue = static::stripTags($varValue);
if (!$blnDecodeEntities) {
$varValue = static::encodeSpecialChars($varValue);
}
$varValue = static::encodeInsertTags($varValue);
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}