https://github.com/titpetric/minitpl
Miniature fully featured PHP template engine
https://github.com/titpetric/minitpl
erb minitpl php smarty templating
Last synced: 11 months ago
JSON representation
Miniature fully featured PHP template engine
- Host: GitHub
- URL: https://github.com/titpetric/minitpl
- Owner: titpetric
- License: wtfpl
- Created: 2010-06-04T07:57:05.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2023-05-18T15:11:53.000Z (about 3 years ago)
- Last Synced: 2025-06-16T02:04:52.984Z (about 1 year ago)
- Topics: erb, minitpl, php, smarty, templating
- Language: PHP
- Homepage:
- Size: 62.5 KB
- Stars: 12
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# MiniTPL
The goal of the MiniTPL template engine is to provide a miniature
framework which allows you to rapidly create and consume
Smarty-like templates without adding the overhead of Smarty to
your choice of a PHP framework.
In benchmarks the speed of Mini TPL is very close to PHP itself.
All that is usually needed for Mini TPL is a 3KB PHP code overhead.
So it beats Smarty, and usual PHP vsprintf and str_replace functionality.
With a total size of about 13KB and the functionality contained, this is
one of the smallest full featured template engines for PHP to date.
MiniTPL is available on [packagist as monotek/minitpl](https://packagist.org/packages/monotek/minitpl).
To start using MiniTPL in your project with [composer](http://getcomposer.org/), create a composer.json file:
```
{
"require": {
"monotek/minitpl": ">=1.0"
}
}
```
And run `composer install`. You can start using MiniTPL right away.
```
load("test.tpl");
$tpl->render();
```
# Testing
The project tries to maintain 100% code coverage. You can verify this by running `phpunit --coverage-text`,
or uncommenting the logging section within phpunit.xml.