Version: current

# Class Cookie

A set of static methods for manipulating cookies.

Package: sapphire\misc
Located at sapphire/core/Cookie.php

## Methods summary

`public static` | # `set( string $name, string $value, integer $expiryDays = 90, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = false )` Set a cookie variable Set a cookie variable #### Parameters $name string $name The variable name $value string $value The variable value. May be an array or object if you wish. $expiryDays int $expiryDays The expiry time, in days. Defaults to 90. $path string $path See http://php.net/set_session $domain string $domain See http://php.net/set_session $secure boolean $secure See http://php.net/set_session $httpOnly boolean $httpOnly See http://php.net/set_session (PHP 5.2+ only)
`public static` | # `get( mixed $name )` Get a cookie variable Get a cookie variable
`public static` | # `forceExpiry( mixed $name )`
`public static` | # `set_report_errors( mixed $reportErrors )`
`public static` | # `report_errors( )`

### Magic methods summary

## Properties summary

`public static boolean` | $report_errors | #

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -