Symfony\Component\HttpFoundation\Cookie::__construct
Constructor.
Signature
public function __construct(string
$name,
[string
$value = null,
[DateTime
$expire = 0,
[string
$path = '/',
[string
$domain = null,
[Boolean
$secure = false,
[Boolean
$httpOnly = true]]]]]] )
Parameters
$name
—
string
- The name of the cookie
$value
—
string
- The value of the cookie
$expire
—
integer
- The time the cookie expires
$path
—
string
- The path on the server in which the cookie will be available on
$domain
—
string
- The domain that the cookie is available to
$secure
—
object
- Whether the cookie should only be transmitted over a secure HTTPS connection from the client
$httpOnly
—
object
- Whether the cookie will be made accessible only through the HTTP protocol
Errors/Exceptions
-
InvalidArgumentException