public function setEncryptedCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null)
    {
        $expires = is_null($expires) ? $this->config('cookies.lifetime') : $expires;
        if (is_string($expires)) {
            $expires = strtotime($expires);
        }
        $secureValue = \Slim\Http\Util::encodeSecureCookie(
            $value,
            $expires,
            $this->config('cookies.secret_key'),
            $this->config('cookies.cipher'),
            $this->config('cookies.cipher_mode')
        );
        $this->setCookie($name, $secureValue, $expires, $path, $domain, $secure, $httponly);
    }
public function setEncryptedCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null)
    {
        $expires = is_null($expires) ? $this->config('cookies.lifetime') : $expires;
        if (is_string($expires)) {
            $expires = strtotime($expires);
        }
        $secureValue = \Slim\Http\Util::encodeSecureCookie(
            $value,
            $expires,
            $this->config('cookies.secret_key'),
            $this->config('cookies.cipher'),
            $this->config('cookies.cipher_mode')
        );
        $this->setCookie($name, $secureValue, $expires, $path, $domain, $secure, $httponly);
    }
public function setEncryptedCookie ( $ name , $ value , $ expires = null , $ path = null , $ domain = null , $ secure = null , $ httponly = null ) { $ expires = is_null ( $ expires ) ? $ this -> config ( 'cookies.lifetime' ) : $ expires ; if ( is_string ( $ expires ) ) { $ expires = strtotime ( $ expires ) ; } $ secureValue = \ Slim \ Http \ Util :: encodeSecureCookie ( $ value , $ expires , $ this -> config ( 'cookies.secret_key' ) , $ this -> config ( 'cookies.cipher' ) , $ this -> config ( 'cookies.cipher_mode' ) ) ; $ this -> setCookie ( $ name , $ secureValue , $ expires , $ path , $ domain , $ secure , $ httponly ) ; }
Set encrypted HTTP cookie

@param string    $name       The cookie name
@param mixed     $value      The cookie value
@param mixed     $expires    The duration of the cookie;
If integer, should be UNIX timestamp;
If string, converted to UNIX timestamp with `strtotime`;
@param string    $path       The path on the server in which the cookie will be available on
@param string    $domain     The domain that the cookie is available to
@param bool      $secure     Indicates that the cookie should only be transmitted over a secure
HTTPS connection from the client
@param  bool     $httponly   When TRUE the cookie will be made accessible only through the HTTP protocol
Set encrypted HTTP cookie