private function sessionCookie(UriInterface $uri, string $id = null): Cookie
    {
        return Cookie::create(
            $this->config->getCookie(),
            $id,
            $this->config->getLifetime(),
            $this->httpConfig->basePath(),
            $this->httpConfig->cookieDomain($uri),
            $this->config->isSecure(),
            true
        );
    }
private function sessionCookie(UriInterface $uri, string $id = null): Cookie
    {
        return Cookie::create(
            $this->config->getCookie(),
            $id,
            $this->config->getLifetime(),
            $this->httpConfig->basePath(),
            $this->httpConfig->cookieDomain($uri),
            $this->config->isSecure(),
            true
        );
    }
private function sessionCookie ( UriInterface $ uri , string $ id = null ) : Cookie { return Cookie :: create ( $ this -> config -> getCookie ( ) , $ id , $ this -> config -> getLifetime ( ) , $ this -> httpConfig -> basePath ( ) , $ this -> httpConfig -> cookieDomain ( $ uri ) , $ this -> config -> isSecure ( ) , true ) ; }
Generate session cookie.

@param UriInterface $uri Incoming uri.
@param string|null  $id
@return Cookie
Generate session cookie .