From 0ec1a10d90a6b8a8f2c89cf3c43d62790a67b16f Mon Sep 17 00:00:00 2001 From: matthes Date: Wed, 26 Jul 2017 17:58:57 +0200 Subject: [PATCH] Some documentation --- README.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7f432cc..ccccba1 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,28 @@ code is eval'ed. So TextTemplate should be more secure than Smarty or Twig by de TextTemplate supports infinite-nested loops and sequences. +## Basic Example +```php + +// 1. Define the Template +$tplStr = << "Matthias" +]; + +// 3. Parse +$tt = new TextTemplate($tplStr); +echo $tt->apply ($data); +``` + + ## Install I prefer and recommend using [composer](http://getcomposer.com): @@ -43,27 +65,6 @@ use TextTemplate. It's just one class. _TextTemplate uses Phing to build the phar-archives and gzip them. Just execute main-target in build.xml to build your own version_ -## Basic Example -```php - -// 1. Define the Template -$tplStr = << "Matthias" -]; - -// 3. Parse -$tt = new TextTemplate($tplStr); -echo $tt->apply ($data); -``` - ## Value injection