From da4f78acb9b9d932423bf59a791554cf9552381b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sun, 21 Jan 2018 11:01:08 +0100 Subject: Move BigPipe::singleResponse() to Pagelet::flush() --- include/classes/BigPipe/BigPipe.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'include/classes/BigPipe/BigPipe.php') diff --git a/include/classes/BigPipe/BigPipe.php b/include/classes/BigPipe/BigPipe.php index 9bb9fcb..d84083e 100644 --- a/include/classes/BigPipe/BigPipe.php +++ b/include/classes/BigPipe/BigPipe.php @@ -39,21 +39,6 @@ class BigPipe { unset(self::$pagelets[spl_object_hash($Pagelet)]); } - #=============================================================================== - # Prints a single pagelet response - #=============================================================================== - private static function singleResponse(Pagelet $Pagelet) { - $pageletJSON = $Pagelet->getStructure(); - - $pageletHTML = removeLineBreaksAndTabs($Pagelet->getHTML()); - $pageletHTML = str_replace('--', '--', $pageletHTML); - - $pageletJSON = json_encode($pageletJSON); - - echo "\n"; - echo "\n\n"; - } - #=============================================================================== # Sends output buffer so far as possible towards user #=============================================================================== @@ -80,8 +65,7 @@ class BigPipe { if(self::enabled()) { foreach($pagelets as $Pagelet) { - self::singleResponse($Pagelet); - self::flushOutputBuffer(); + $Pagelet->flush(); } } -- cgit v1.2.3