" . $app['timer']->delay() .": In aAM

\n"; /* Note how content added to the response like this looks as if it had been added after the echo'ed content in the global middleware. Compare the timestamps for sequence */ if ($response instanceof JsonResponse) { $content = $response->getContent(); $raw = json_decode($content, TRUE); $raw[] = $MESSAGE; $newContent = json_encode($raw); $response->setContent($newContent); return $response; } // Only echo info on text responses. $ct = $response->headers->get('Content-Type'); if (isset($ct) && strpos($ct, 'text') !== 0) { return; } echo $MESSAGE; flush(); } }