Skip to content

ericsizemore/simple_tpl

Repository files navigation

Simple Template Engine - Text based template parser.

Build Status Code Coverage Scrutinizer Code Quality PHPStan Tests Psalm Static analysis Type Coverage Psalm Level Latest Stable Version Development Version Downloads per Month

Simple Template Engine is a small, simple text-based template parsing engine that works on text replacement.

Important Note

  • The master branch currently holds the work in progress version 3.x, which is a break from the backward compatibility promise. This will be resolved once 3.0.0 is released.
  • Since 3.x is under development, it is not recommended to use in a production environment. The public api, implementations, etc. can (and will likely) change.

Installation

Composer

$ composer require esi/simple_tpl

Then, within your project (if not already included), include composer's autoload. For example:

<?php

require_once 'vendor/autoload.php';
use Esi\SimpleTpl\Template;

$tpl = new Template();

?>

Usage

Some examples have been provided within the examples folder.

More documentation can be found within the docs folder.

About

Requirements

  • Simple Template Engine works with PHP 8.2.0 or above.

Contributing

See CONTRIBUTING.

Author

Eric Sizemore - admin@secondversion.com - https://www.secondversion.com

License

Simple Template Engine's license depends on the version you are using: