protected function setCookie($value, array $params)
    {
        if (headers_sent()) {
            throw new TokenStorageException('Cannot store CSRF token, headers already sent');
        }

        return setcookie(
            $params['name'],
            $value,
            $params['expire'],
            $params['path'],
            $params['domain'],
            $params['secure'],
            $params['httpOnly']
        );
    }
protected function setCookie($value, array $params)
    {
        if (headers_sent()) {
            throw new TokenStorageException('Cannot store CSRF token, headers already sent');
        }

        return setcookie(
            $params['name'],
            $value,
            $params['expire'],
            $params['path'],
            $params['domain'],
            $params['secure'],
            $params['httpOnly']
        );
    }
protected function setCookie ( $ value , array $ params ) { if ( headers_sent ( ) ) { throw new TokenStorageException ( 'Cannot store CSRF token, headers already sent' ) ; } return setcookie ( $ params [ 'name' ] , $ value , $ params [ 'expire' ] , $ params [ 'path' ] , $ params [ 'domain' ] , $ params [ 'secure' ] , $ params [ 'httpOnly' ] ) ; }
Sets the cookie that stores the secret CSRF token.
@param string $value The value for the cookie
@param array $params Parameters for the cookie
@return bool True if the cookie was set successfully, false if not
@throws TokenStorageException If the headers have already been sent
@codeCoverageIgnore
Sets the cookie that stores the secret CSRF token .