getCookieParams(); $orders = []; if (isset($cookies['order']) && $cookies['order'] !== '') { $orders = explode(',', $cookies['order']); } if (count($orders) > 0) { $orderList = ''; $message = '

ごちそうさまでした。

'; } else { $orderList = ''; $message = '

注文がありません。

'; } $body = << いただきます

いただきます

{$orderList} {$message} もう一度注文する
HTML; return $this->responseFactory->createResponse(200) ->withHeader('Content-Type', 'text/html; charset=UTF-8') ->withHeader('Set-Cookie', 'order=; Max-Age=0; path=/') ->withBody($this->streamFactory->createStream($body)); } }