Download the PHP package slepic/php-template without Composer
On this page you can find all versions of the php package slepic/php-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download slepic/php-template
More information about slepic/php-template
Files in slepic/php-template
Package php-template
Short Description Simple PHP abstraction of template rendering.
License BSD-3-Clause
Informations about the package php-template
php-template
Template rendering abstraction library. Abstract your libraries from specific templating engines.
Requirements
PHP 7.4 or 8
Installation
Install with composer
Interfaces
This is the abstraction of any data rendering template.
Classes
A simple template implementation, which renders the data using another PHP script (given its filename) and PHP ob_* functions.
Template decorator which allows to feed your templates with default data hidden from the template consumer.
Contribution
If you create a library that depends on this one and you use composer, please consider the following:
- If you implement the , please place in the provide section of your .
- If you consume the , please place in the provide section of your .
Changelog
1.1.0
- added new class
DefaultDataTemplate
OutputBufferTemplate
now ends the output buffer if the included template throws an exception.OutputBufferTemplate
now usesinclude
instead ofrequire
to execute the template script .
1.0.0
- bump PHP to ^7.4 || ^8.0
- TemplateInterface::render() now has string return typehint
- OutputBufferTemplate::render throws InvalidArgumentException if data argument contains keys that cannot be used as local variable names
- use squizlabs/php_codesniffer instead of friendsofphp/php-cs-fixer for style check
- bump dev deps to latest versions
- use composer docker image for dev
- move composer scripts to makefile
0.2.0
- Added array typehint for first argument of .
- Changed travis setup to only run tests in oldest and newest php versions supported by this package (that is 5.6 and 7.3).