PHP Classes

File: description.md

Recommend this page to a friend!
  Classes of wim niemans   SIREN PHP Templating Library   description.md   Download  
File: description.md
Role: Documentation
Content type: text/markdown
Description: short readme
Class: SIREN PHP Templating Library
Template engine featuring recursion and nesting
Author: By
Last change: cosmetic changes
Date: 3 years ago
Size: 1,025 bytes
 

Contents

Class file image Download

SIREN is a base PHP library to do templating in one go. It has a simple, sufficient API, performs recursive replacement, and uses an intuitive syntax. That's all you need.

syntax: {[$|?]var} where var  is [text]{var}[text]  
                   where text is '-._[\w\d\]'

SIREN features a (key, value) array of variables and exercises PCRE patterns to parse text. The library supports recursion, including files and processing of blocks.

Release 1.
    Allows setFile to refresh the var.
    Added the (internal) vars templateLocation and debugInfo.
    Added Global Variables: varNames starting with '$'.
Release 2.
    Added setVardata() to escape its value from parsing.
    Introduced recursionDepth, default is 'auto'.
    Allow recursionDepth manipulation.
    Added conditional varValues: varNames starting with '?'.

More documentation: full readme, howto use recursion, api docs, license.