src/mako/session/Session.php
protected function setCookie(): void
	{
		if($this->options['cookie_options']['secure'] && !$this->request->isSecure())
		{
			throw new RuntimeException('Attempted to set a secure cookie over a non-secure connection.');
		}

		$this->response->getCookies()->addSigned($this->options['name'], $this->sessionId, $this->options['cookie_ttl'], $this->options['cookie_options']);
	}
protected function setCookie(): void
	{
		if($this->options['cookie_options']['secure'] && !$this->request->isSecure())
		{
			throw new RuntimeException('Attempted to set a secure cookie over a non-secure connection.');
		}

		$this->response->getCookies()->addSigned($this->options['name'], $this->sessionId, $this->options['cookie_ttl'], $this->options['cookie_options']);
	}
protected function setCookie ( ) : void { if ( $ this -> options [ 'cookie_options' ] [ 'secure' ] && ! $ this -> request -> isSecure ( ) ) { throw new RuntimeException ( 'Attempted to set a secure cookie over a non-secure connection.' ) ; } $ this -> response -> getCookies ( ) -> addSigned ( $ this -> options [ 'name' ] , $ this -> sessionId , $ this -> options [ 'cookie_ttl' ] , $ this -> options [ 'cookie_options' ] ) ; }
Adds a session cookie to the response.

@throws \RuntimeException
Adds a session cookie to the response .