Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
doSetCookie example
if
(
$cookie
->
isSecure
(
)
&& !
$request
->
isSecure
(
)
)
{
throw
SecurityException::
forDisallowedAction
(
)
;
}
$name
=
$cookie
->
getPrefixedName
(
)
;
$value
=
$cookie
->
getValue
(
)
;
$options
=
$cookie
->
getOptions
(
)
;
if
(
$cookie
->
isRaw
(
)
)
{
$this
->
doSetRawCookie
(
$name
,
$value
,
$options
)
;
}
else
{
$this
->
doSetCookie
(
$name
,
$value
,
$options
)
;
}
}
$this
->cookieStore->
clear
(
)
;
}
/** * Extracted call to `setrawcookie()` in order to run unit tests on it. * * @codeCoverageIgnore */