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 */
    
Home | Imprint | This part of the site doesn't use cookies.