Cartalyst\Sentinel\Cookies\NativeCookie::setCookie PHP Method

setCookie() protected method

Sets a PHP cookie.
protected setCookie ( mixed $value, integer $lifetime, string $path = null, string $domain = null, boolean $secure = null, boolean $httpOnly = null ) : void
$value mixed
$lifetime integer
$path string
$domain string
$secure boolean
$httpOnly boolean
return void
    protected function setCookie($value, $lifetime, $path = null, $domain = null, $secure = null, $httpOnly = null)
    {
        setcookie($this->options['name'], json_encode($value), $lifetime, $path ?: $this->options['path'], $domain ?: $this->options['domain'], $secure ?: $this->options['secure'], $httpOnly ?: $this->options['http_only']);
    }