public function getCookie(string $name = null, string $prefix = '')
	{
		// if no name given, return them all
		if (empty($name))
		{
			return $this->cookies;
		}

		if ($prefix === '' && $this->cookiePrefix !== '')
		{
			$prefix = $this->cookiePrefix;
		}

		$name = $prefix . $name;

		foreach ($this->cookies as $cookie)
		{
			if ($cookie['name'] === $name)
			{
				return $cookie;
			}
		}
		return null;
	}
public function getCookie(string $name = null, string $prefix = '')
	{
		// if no name given, return them all
		if (empty($name))
		{
			return $this->cookies;
		}

		if ($prefix === '' && $this->cookiePrefix !== '')
		{
			$prefix = $this->cookiePrefix;
		}

		$name = $prefix . $name;

		foreach ($this->cookies as $cookie)
		{
			if ($cookie['name'] === $name)
			{
				return $cookie;
			}
		}
		return null;
	}
public function getCookie ( string $ name = null , string $ prefix = '' ) { // if no name given, return them all if ( empty ( $ name ) ) { return $ this -> cookies ; } if ( $ prefix === '' && $ this -> cookiePrefix !== '' ) { $ prefix = $ this -> cookiePrefix ; } $ name = $ prefix . $ name ; foreach ( $ this -> cookies as $ cookie ) { if ( $ cookie [ 'name' ] === $ name ) { return $ cookie ; } } return null ; }
Returns the cookie

@param string|null $name
@param string      $prefix

@return mixed
Returns the cookie