MAPG-180 don't buffer content output to variable
This commit is contained in:
4 files changed
+6
-13
No files matched your search
@@ -12,7 +12,7 @@ class HtmlContent extends ContentBase
|
||||
$this->data = &$data;
|
||||
}
|
||||
|
||||
public function &render(): string
|
||||
public function render(): void
|
||||
{
|
||||
if (!empty($_ENV['DEV'])) {
|
||||
$generator = new Linker($this->view);
|
||||
@@ -21,14 +21,9 @@ class HtmlContent extends ContentBase
|
||||
|
||||
extract($this->data);
|
||||
|
||||
ob_start();
|
||||
require ROOT . '/cache/views/' . $this->view . '.php';
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$content .= '<!-- __debug__runtime: ' . round((hrtime(true) - SCRIPT_STARTED) / 1e+6, 1) . ' -->';
|
||||
|
||||
return $content;
|
||||
echo '<!-- __debug__runtime: ' . round((hrtime(true) - SCRIPT_STARTED) / 1e+6, 1) . ' -->';
|
||||
}
|
||||
|
||||
public function getContentType(): string
|
||||
|
||||
Reference in new issue
Block a user