Recommend this page to a friend! |
Download .zip |
Info | Example | View files (11) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 37 | All time: 10,403 This week: 175 |
Version | License | PHP version | Categories | |||
sirenade 1.1 | Custom (specified... | 7 | Cache, Templates, Code Generation, PHP 7 |
Description | Author | |
This package can compile templates to PHP and caches the results. |
SIRENADE is a base PHP library that compiles the template text into native PHP and caches the compiled output. It is using the package SIREN for basic functions.
SIREN has a simple, sufficient API, performs recursive replacement, and uses an intuitive syntax.
syntax: {[$|?]var} where var is [text]{var}[text]
where text is '-._[\w\d\]'
SIRENADE allows for embedding native PHP in the template text and features a nice set of logic directives:
if - elseif - else
while and loop with count
for - and foreach struvtures
increment / decrement counts
break and continue
global strings thru sprintf
set and unset variables (i.e. template variables)
<?php .... ?>
(experimental) ASP logic
Like SIREN, it features recursion in an intuitive way and extends SIREN's usage with
syntax {!<simple logic>!}
{!!<advanced logic>!!}
{# <comments> #}
<!-- <comments> -->
<?php <custom native PHP> ?>
<?= <scalar> ?>
{$<global string variable> <parameter>}
<% <ASP logic> %>
<%= <scalar> %>
SIRENADE has all logic expansions and their syntax externally defined as anonymous functions, and allows for simple custom adjustments, or even complete customised additions. See the directory './logic'.
SIRENADE can cache files and blocks on demand, leaving the SIREN recursion for run time expansion. SIRENADE comes with an extensive set of configurable options.
SIRENADE is very fast, not depending on the number of markers, nor the volume of logic.
More documentation: full readme, api docs, logic, license.
Files |
File | Role | Description | ||
---|---|---|---|---|
license (3 files) | ||||
logic (1 file) | ||||
code_of_conduct.md | Doc. | ethics | ||
demo.php | Example | demo source | ||
description.md | Doc. | explanation | ||
developer.manual.html | Doc. | manual | ||
sirenade.usage.md | Doc. | api docs | ||
Stencil.class.php | Class | caching class | ||
Template.class.php | Class | compiling class |
Files | / | license |
File | Role | Description |
---|---|---|
CDDL_1.LICENSE | Lic. | CDDL license |
EUPL-1.2.LICENSE | Lic. | EUPL license |
readme.md | Doc. | license options |
sirenade-2021-02-13.zip 29KB | |
sirenade-2021-02-13.tar.gz | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
SIREN PHP Templating Library | .zip .tar.gz | Parsing and Substituting is left to Siren or any other package that supports it using the same method names. | Required |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.