Ratings | | Unique User Downloads | | Download Rankings |
Not yet rated by the users | | Total: 96 | | All time: 9,643 This week: 141 |
|
Description | | Author |
This package provides a template engine featuring nesting and inclusion.
It provides one base template engine processing class that can parse templates and replace variables with support of recursion.
There is also a sub-class that can also process templates that include other template files and supports nesting of template blocks.
| |
|
|
Innovation award
Nominee: 2x |
|
Details
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.
|
Applications that use this package |
|
|
Boxary Web Application Platform based on Graph Notation |
If you know an application of this package, send a message to the author to add a link here.
|
Other classes that need this package |
|
Class |
Why it is needed |
Dependency |
Sirenade PHP Template Compiler |
Parsing and Substituting is left to Siren or any other package that supports it using the same method names. |
Required |