jeremysells / templar
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP Template Engine based on Output Buffering
1.0.1
2014-08-17 07:56 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2018-07-01 14:41:16 UTC
README
Templar - PHP Output Buffering Template Engine By Jeremy Sells
Example
Code
<?php
$tpl = \JeremySells\Templar\Factories\Tpl::newTemplate(
"/var/www/path/to/file.tpl.php"
);
$tpl->add("noun", "world");
echo $tpl->toString();
?>
Template
<h1>Hello <?php echo htmlentities($tplvars["noun"], ENT_QUOTES, "UTF-8"); ?></h1>