wscore / template
A simple template engine using only PHP.
Installs: 67
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/wscore/template
Requires
- michelf/php-markdown: 1.3
This package is auto-updated.
Last update: 2025-09-28 19:25:29 UTC
README
A simple template engine only with PHP.
- no parsing.
- multiple inheritence, like Twig.
- block, sort of there.
- automatic output encoding and filters.
Multiple Inheritence
layout.php:
Layout:<?php echo $_v->get( 'content' ); ?>
and you have example.php
<?php $_v->parent( __DIR__ . '/layout.php' ); ?> test:<?php echo $_v->test;?>
and you run:
$content = $t->render( 'sample.php', array( 'test' => 'This is a sample.' ) );
then you will get:
Layout:test:This is a sample.
To-Do
must think about how to manage lots of filters with ease.