Easy and fast HTML template rendering class.
- Only one method (static)
- Supported dot and slash template render path (e.g "gallery/template/page" and "gallery.template.page").
- PHP 5.4
Set template dir and file extension in file GalaxyHTMLRender.class.php
public static $DIR = '/view/'; /* template directory */
public static $EXTENSION = '.php'; /* template extensions */
Create template and output two variables (for example — gallery/template/page.php)
<?=$variable1;?> <?=$variable2;?>
Call method and set two variables
echo GalaxyHTMLRender::render('gallery.template.page', ['variable1' => 'Hello', 'variable2' => 'world']);
Profit!
Hello world