Exemple #1
0
 protected function printOutput()
 {
     header("Content-type: text/html; charset=UTF-8");
     /*AnwDebug::startbench("parseTranslations",true);
     		$sOutput = Anwi18n::parseTranslations($this->out);
     		AnwDebug::stopBench("parseTranslations");*/
     $sOutput = $this->out;
     //full execution time benchmark
     $sElapsedTime = AnwDebug::stopBench("GLOBAL");
     //show execution time ?
     if (self::globalCfgShowExecTime()) {
         $fMemoryUsage = AnwDebug::getMemoryUsage();
         $sOutput = str_replace('%ANWEXECTIME%', ' • ' . $sElapsedTime . ' sec • ' . $fMemoryUsage . ' MB', $sOutput);
     } else {
         $sOutput = str_replace('%ANWEXECTIME%', '', $sOutput);
     }
     //show full debug ?
     if (AnwUtils::isViewDebugAuthorized()) {
         $sLog = AnwDebug::getLog();
         if ($sLog) {
             $sOutput = str_replace('</body>', '<div id="debug">' . $sLog . '</div></body>', $sOutput);
         }
     }
     print $sOutput;
     exit;
 }