Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getExpiresString example
if
(
$this
->
getValue
(
)
=== ''
)
{
$cookieHeader
[
]
=
$this
->
getPrefixedName
(
)
. '=deleted';
$cookieHeader
[
]
= 'Expires=' .
gmdate
(
self::EXPIRES_FORMAT, 0
)
;
$cookieHeader
[
]
= 'Max-Age=0';
}
else
{
$value
=
$this
->
isRaw
(
)
?
$this
->
getValue
(
)
:
rawurlencode
(
$this
->
getValue
(
)
)
;
$cookieHeader
[
]
=
sprintf
(
'%s=%s',
$this
->
getPrefixedName
(
)
,
$value
)
;
if
(
$this
->
getExpiresTimestamp
(
)
!== 0
)
{
$cookieHeader
[
]
= 'Expires=' .
$this
->
getExpiresString
(
)
;
$cookieHeader
[
]
= 'Max-Age=' .
$this
->
getMaxAge
(
)
;
}
}
if
(
$this
->
getPath
(
)
!== ''
)
{
$cookieHeader
[
]
= 'Path=' .
$this
->
getPath
(
)
;
}
if
(
$this
->
getDomain
(
)
!== ''
)
{
$cookieHeader
[
]
= 'Domain=' .
$this
->
getDomain
(
)
;
}