'raw' => !
$decode,
'samesite' => null,
];
$parts = HeaderUtils::
split($cookie, ';='
);
$part =
array_shift($parts);
$name =
$decode ?
urldecode($part[0
]) :
$part[0
];
$value =
isset($part[1
]) ?
($decode ?
urldecode($part[1
]) :
$part[1
]) : null;
$data = HeaderUtils::
combine($parts) +
$data;
$data['expires'
] = self::
expiresTimestamp($data['expires'
]);
if (isset($data['max-age'
]) && ($data['max-age'
] > 0 ||
$data['expires'
] >
time())) { $data['expires'
] =
time() +
(int) $data['max-age'
];
} return new static($name,
$value,
$data['expires'
],
$data['path'
],
$data['domain'
],
$data['secure'
],
$data['httponly'
],
$data['raw'
],
$data['samesite'
]);
} /**
* @see self::__construct
*
* @param self::SAMESITE_*|''|null $sameSite
*/