Skip to content

designcise/bitframe-renderer

Repository files navigation

BitFrame\Renderer

CI Maintainability Test Coverage

Simple PHP-based templating engine.

Installation

Install using composer:

$ composer require designcise/bitframe-renderer

Please note that this package requires PHP 8.2 or newer.

Usage Example

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>

Tests

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

Contributing

Documentation

Complete documentation for v3 will be available soon.

License

Please see License File for licensing information.

About

Native PHP based template renderer

Resources

License

Stars

Watchers

Forks

Packages