Get cookie with FILTER_SANITIZE_STRING

@param  string $key

@return string|null
482708
public function get($key)
    {
        if (isset($this->store[$key])) {
            return filter_var($this->store[$key], FILTER_SANITIZE_STRING);
        }

        return filter_input(INPUT_COOKIE, $key, FILTER_SANITIZE_STRING);
    }
1343589
public function readLogin($key)
    {
        $key = $this->getKey($key);
        
        $ticket = Cookie::get($key);
        return $ticket ? Cache::get($ticket) : null;
    }
1294219
public function getActualFilter($key = NULL)
    {
        $filter = $this->filter ? $this->filter : $this->defaultFilter;
        return $key !== NULL && isset($filter[$key]) ? $filter[$key] : $filter;
    }
329536
public function getResponseCookie($key)
    {
        return isset($this->responseCookies[$key]) ? $this->responseCookies[$key] : null;
    }
1322257
public function get(string $key)
    {
        $hash =  self::findFirst([
            'conditions' => "{$this->settingsKey} = ?0 and key = ?1",
            'bind' => [$this->getSettingsKey(), $key]
        ]);

        if ($hash) {
            return $hash->value;
        }

        return null;
    }
503285
public function getParameter($key)
    {
        $filteredParameters = $this->parameters->filter(
            function ($parameter) use ($key)
            {
                // Must not be identical because of string to integer conversion
                return ($key == $parameter->getName());
            }
        );

        return count($filteredParameters) ? $filteredParameters->first() : null;
    }
36116
public function cookies($key = null)
    {
        if ($key) {
            return $this->cookies->get($key);
        }

        return $this->cookies;
       
    }
1099319
protected function getAsString($key)
    {
        $this->checkForNonEmptyKey($key);

        return trim((string)$this->get($key));
    }
870837
public function getFromCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return unserialize($value);
    }
    return null;
  }
535760
protected function getOneByCompoundKey($key)
	{
		$sanitizedKey = [];

		// We can can potentially accept an associaitve or standard array.
		if($this->isAssociativeArray($key))
		{
			if(array_key_exists('entity_type', $key) && array_key_exists('entity_id', $key))
			{
				$sanitizedKey['entity_type'] = $key['entity_type'];
				$sanitizedKey['entity_id']   = $key['entity_id'];
			}
			else
			{
				return new Payload(null, 'insufficient_entity_key');
			}
		}
		else
		{
			$sanitizedKey['entity_type'] = $key[0];
			$sanitizedKey['entity_id']   = $key[1];
		}

		return $this->aggregate[$this->formatEntityType($sanitizedKey['entity_type'])]->first(
			['filter' => ['id' => $sanitizedKey['entity_id']]]
		);
	}
46296
protected function getOneByCompoundKey($key)
	{
		$sanitizedKey = [];

		// We can can potentially accept an associaitve or standard array.
		if($this->isAssociativeArray($key))
		{
			if(array_key_exists('entity_type', $key) &&  array_key_exists('entity_id', $key))
			{
				$sanitizedKey['entity_type'] = $key['entity_type'];
				$sanitizedKey['entity_id']   = $key['entity_id'];
			}
			else
			{
				return new Payload(null, 'insufficient_entity_key');
			}
		}
		else
		{
			$sanitizedKey['entity_type'] = $key[0];
			$sanitizedKey['entity_id']   = $key[1];
		}

		return $this->aggregate[$this->formatEntityType($sanitizedKey['entity_type'])]->get([['field' => 'id', 'value' => $sanitizedKey['entity_id'], 'operator' => '=', 'or' => false]]);
	}
314677
public function getInt($key)
    {
        if (isset($this->store[$key])) {
            return (int) filter_var($this->store[$key], FILTER_SANITIZE_NUMBER_INT);
        }

        return (int) filter_input(INPUT_COOKIE, $key, FILTER_SANITIZE_NUMBER_INT);
    }
518754
public function get($key) {
        $filename = $this->generateFileLocation($key);
        if (file_exists($filename) && is_readable($filename)) {
            $cache = unserialize(file_get_contents($filename));
            if ($cache['expires'] > time()) {
                return $cache['content'];
            } else {
                unlink($filename);
            }
        }
        return null;
    }
564552
public function get($key)
    {
        $k = $this->hash($key);
        if (!isset($this->cache[$k])) {
            return null;
        }
        $item = $this->cache[$k];
        if (isset($item->expire)) {
            if (microtime(true) >= $item->expire) {
                unset($this->cache[$k]);
                return null;
            }
        }
        return $item;
    }
356199
public static function pull($key)
    {
        if (isset($_COOKIE[self::$prefix . $key])) {
            setcookie(self::$prefix . $key, '', time() - 3600, '/');

            return $_COOKIE[self::$prefix . $key];
        }

        return false;
    }
314921
public function getCookieValue($key)
    {
        return isset($this->cookies[$key]) ? $this->cookies[$key] : null;
    }
751585
public function cookie($name) {
        if ( in_array($name, $this->cookies) ) {
            return filter_input(INPUT_COOKIE, $name, FILTER_SANITIZE_STRING);
        }
        return NULL;
    }