Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/patinthehat/templated-text

Basic text templating for PHP 5+,7+.
https://github.com/patinthehat/templated-text

composer-package handlebars php php-library php5 php7 template-engine template-library templating

Last synced: 3 days ago
JSON representation

Basic text templating for PHP 5+,7+.

Awesome Lists containing this project

README

        

### Permafrost Templated Text
---
Basic text templating for PHP 5+.

---

#### Installation
Install with composer:
`composer require patinthehat/templated-text`

---

#### Sample Usage
```php
variable('one', 'OONNEE')
->variable('hw', 'Hello World')
->filter('test', function($v) { return '->>'.$v.'<<-'; })
->template('This is a test template, one is {{one|aquote}} and {{hw}}! then, {{hw | quote | test}}!! and {{one | quote}} ');

echo $tt->process() . PHP_EOL . PHP_EOL;
```

---

#### Sample Output

`This is a test template, one is ->OONNEE<- and Hello World! then, ->>"Hello World"<<-!! and "OONNEE"`

---

#### License
This project is licensed under the [MIT License](LICENSE).