Solar_Http_Response::setCookie()

public Solar_Http_Response Solar_Http_Response::setCookie ( string $name , string $value = '' , int|string $expires = 0 , string $path = '' , string $domain = '' , bool $secure = false , bool $httponly = NULL )

Sets a cookie value in $this->_cookies; will be sent to the client at display() time.

Parameters

  • (string) $name: The name of the cookie.

  • (string) $value: The value of the cookie.

  • (int|string) $expires: The Unix timestamp after which the cookie expires. If non-numeric, the method uses strtotime() on the value.

  • (string) $path: The path on the server in which the cookie will be available on.

  • (string) $domain: The domain that the cookie is available on.

  • (bool) $secure: Indicates that the cookie should only be transmitted over a secure HTTPS connection.

  • (bool) $httponly: When true, the cookie will be made accessible only through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript.

Returns

  • (Solar_Http_Response) This response object.

Description

Sets a cookie value in $this->_cookies; will be sent to the client at display() time.

See Also



Local