code: 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];
  	}
docs: Return a $_COOKIE variable
  
  @param string  $strKey            The variable name
  @param boolean $blnDecodeEntities If true, all entities will be decoded
  
  @return mixed The cleaned variable value