rain / raintpl
easy and fast template engine
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: 4.4.*
- dev-master
- 3.1.1
- 3.1.0
- 3.0.0
- dev-fix_fread_empty_file
- dev-readme_update
- dev-CompressPluginFix
- dev-trailing_slash_path
- dev-absolute_path
- dev-path_reduce_fix
- dev-issue_123
- dev-windows_include_bug
- dev-code_style
- dev-split_parser
- dev-issue-48
- dev-issue-7
- dev-issue-95
- dev-issue-94
- dev-issue_77
- dev-autoescape-tag
This package is not auto-updated.
Last update: 2024-12-21 16:20:36 UTC
README
By Federico Ulfo and a lot awesome contributors!
RainTPL is an easy template engine for PHP that enables designers and developers to work better together, it loads HTML template to separate the presentation from the logic.
Features
- Easy for designers, only 10 tags, {$variable}, {#constant#}, {include}, {loop}, {if}, { comment }, {noparse}, {function}
- Easy for developers, 5 methods to load and draw templates.
- Powerful, modifier and operation with variables
- Extensible, load plugins and register new tags
- Secure, sandbox with blacklist.
Installation / Usage
-
Install composer https://github.com/composer/composer
-
Create a composer.json inside your application folder:
{ "require": { "rain/raintpl": ">=3.0.0" } }
-
Run the following code
$ php composer.phar install
-
Run one example of RainTPL with your browser:
http://localhost/raintpl3/example.php
Documentation
The documentation of RainTPL is divided in documentation for web designers and documentation for PHP developers.
Licence
RainTPL 3, like its antecessor Rain.TPL version 2, is, as of 2018-06-07, published under the MIT Licence.
The above applies to RainTPL 3 itself, not the entire content of this repository. Some of the example-*.php
files and the content below templates/
in this repository are copies of external code under various licences, such as:
- Twitter Bootstrap, under the Apache v2 licence
- LESS - Leaner CSS, under the Apache v2 licence
Note that not all external content comes with full source code, it’s usually just a copy of (possibly minified or otherwise modified) parts of their distribution. The example files may be used as starting points without limitation except the licences on the external content.