Simple PHP-based templating engine.
Install using composer:
$ composer require designcise/bitframe-renderer
Please note that this package requires PHP 8.2 or newer.
use BitFrame\Renderer\Renderer;
$renderer = new Renderer([
'main' => __DIR__ . '/tpl/',
], 'tpl');
$renderer->withData(['foo' => 'bar']);
$output = $renderer->render('main::test', ['baz' => 'qux']);
<!-- ~/tpl/test.tpl -->
<p><?= $foo; ?> <?= $baz; ?></p>
To run the tests you can use the following commands:
Command | Type |
---|---|
composer test |
PHPUnit tests |
composer style |
CodeSniffer |
composer md |
MessDetector |
composer check |
PHPStan |
- File issues at https://github.com/designcise/bitframe-renderer/issues
- Issue patches to https://github.com/designcise/bitframe-renderer/pulls
Complete documentation for v3 will be available soon.
Please see License File for licensing information.