PHPackages                             anpv1/minplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. anpv1/minplate

ActiveLibrary

anpv1/minplate
==============

A mini template engine for PHP

v1.0.3(6y ago)025MITPHP

Since Jun 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/anpv1/minplate)[ Packagist](https://packagist.org/packages/anpv1/minplate)[ RSS](/packages/anpv1-minplate/feed)WikiDiscussions master Synced today

READMEChangelog (4)DependenciesVersions (5)Used By (0)

minplate
========

[](#minplate)

A mini template engine for PHP

### Introduction

[](#introduction)

minplate is a mini template engine for PHP which has a very simple API and easy to learn. minplate use pure PHP so it's super fast and you don't have to learn new syntax. minplate support the below features:

- assign variables for the template.
- creating block in the layout which can be override.
- include/inherite other template file.
- allow override the template directory with add\_path function. The latest inserted path will be used first.

That's all!

### API

[](#api)

```
function __construct($template_path = './');
function add_path($template_path);
function assign(string $variable_name, $value);
function include(string $template_name);
function block(string $block_name);
function end_block(string $block_name);
function render(string $template_name, array $data = []);
```

### Examples

[](#examples)

index.php

```
