The View class holds all methods to render the current page using a template file.
When render() is called, first the template file gets loaded. The output, basically the raw template HTML (including the generated HTML by PHP in the template file) gets stored in $output.
In a second step all statements and content in $output gets processed.
That way, it is possible that the template.php file can include HTML as well as PHP, while the "user-generated" content in the text files can not have any executable code (PHP). There are no "eval" functions needed, since all the PHP gets only included from the template files, which should not be edited by users anyway.
In a last step, all URLs within the generated HTML get resolved to be relative to the server's root (or absolute), before $output gets returned.
Copyright: Copyright (c) 2013-2019 by Marc Anton Dahmen - http://marcdahmen.de
License: license - http://automad.org/license
Author: Marc Anton Dahmen
Located at core/view.php