/** * @param ICookie $cookie * @param $string */ protected function parseFlags(ICookie $cookie, $string) { if (strlen($string) == 0) { return; } if ($string == 'secure') { $cookie->setSecure(true); } else { if ($string == 'httpOnly') { $cookie->setHttpOnly(true); } } }