This commit is contained in:
bzick 2016-04-13 11:34:38 +03:00
parent eb75ae0bbb
commit 45c9f27ae6
3 changed files with 24 additions and 26 deletions

View File

@ -1,31 +1,27 @@
Fenom - Template Engine for PHP Fenom - Template Engine for PHP
=============================== ===============================
> Composer [package](https://packagist.org/packages/fenom/fenom): `{"fenom/fenom": "2.*"}`. <br /> **Fenóm** - lightweight and fast template engine for PHP.
> For old version: `{"fenom/fenom": "1.*"}`. <br />
> [List](https://github.com/fenom-template/fenom/wiki/Migrate-from-1.4.9-to-2.0) of incompatibilities between **1** and **2** versions.
[![Latest Stable Version](https://poser.pugx.org/fenom/fenom/v/stable.png)](https://packagist.org/packages/fenom/fenom) * **Subject:** Template engine
[![Build Status](https://travis-ci.org/fenom-template/fenom.svg?branch=master)](https://travis-ci.org/fenom-template/fenom) * **Syntax:** Smarty-like
[![Coverage Status](https://coveralls.io/repos/fenom-template/fenom/badge.svg?branch=master)](https://coveralls.io/r/fenom-template/fenom?branch=master) * **Documentation:** [english](./docs/en/readme.md), [russian](./docs/ru/readme.md)
[![Total Downloads](https://poser.pugx.org/fenom/fenom/downloads.png)](https://packagist.org/packages/fenom/fenom) * **PHP version:** 5.3+
* **State:** [![Build Status](https://travis-ci.org/fenom-template/fenom.svg?branch=master)](https://travis-ci.org/fenom-template/fenom) [![Coverage Status](https://coveralls.io/repos/fenom-template/fenom/badge.svg?branch=master)](https://coveralls.io/r/fenom-template/fenom?branch=master)
* **Version:** [![Latest Stable Version](https://poser.pugx.org/fenom/fenom/v/stable.png)](https://packagist.org/packages/fenom/fenom)
* **Packagist:** [fenom/fenom](https://packagist.org/packages/fenom/fenom) [![Total Downloads](https://poser.pugx.org/fenom/fenom/downloads.png)](https://packagist.org/packages/fenom/fenom)
* **Composer:** `composer require fenom/fenom`
* **Discussion:** [Fenom Forum](https://groups.google.com/forum/#!forum/php-ion)
* **Versioning:** [semver2](http://semver.org/)
* **Performance:** see [benchmark](./docs/en/benchmark.md)
## [Quick start](./docs/en/start.md) :: [Documentation](./docs/readme.md) [[en](./docs/en/readme.md)|[ru](./docs/ru/readme.md)] :: [Benchmark](./docs/en/benchmark.md) ***
<!-- :: [Articles](./docs/articles.md) -->
### What is it ## Quick Start
**Fenóm** — lightweight template engine for PHP. ### Install
It means: If you use composer in your project then you can to install Fenom to project as package.
However, if you are not using composer you have to configure autoloader to work with Fenom.
* Known Smarty-like [syntax](./docs/en/syntax.md) with improvements.
* Very [fast](./docs/en/benchmark.md).
* [Lightweight](./docs/en/benchmark.md).
* Very [flexible](./docs/en/configuration.md#extends).
* Progressive parser without regular expressions.
* High [code coverage](https://coveralls.io/r/bzick/fenom?branch=master).
* Easy to understand [how it works](./docs/en/dev/readme.md).
* Easy to [use](./docs/en/start.md).
* Maximum [protection](./docs/en/configuration.md#configure).
### Usage

View File

@ -55,7 +55,7 @@ Operators
{if $a & 1} {var $b = 4 | $flags} {/if} {if $a & 1} {var $b = 4 | $flags} {/if}
``` ```
### Assignment Operators ### Assignment operators
* `$a = $b` - assignment * `$a = $b` - assignment
* `$a += $b` - assignment with addition * `$a += $b` - assignment with addition
@ -81,9 +81,11 @@ Operators
* `--$a` - decrement the variable and use it * `--$a` - decrement the variable and use it
* `$a--` - use the variable and decrement it * `$a--` - use the variable and decrement it
### String operator ### String operators
* `$a ~ $b` - return concatenation of variables `$a` and `$b` * `$a ~ $b` - return concatenation of variables `$a` and `$b`
* `$a ~~ $b` - return concatenation of variables `$a` and `$b` separated by a space
* `$a ~= $b` - assignment with concatenation
### Ternary operators ### Ternary operators

View File

@ -1,4 +1,4 @@
Tag {extends}] Tag {extends}
============= =============
`{extends}` tags are used in child templates in template inheritance for extending parent templates. `{extends}` tags are used in child templates in template inheritance for extending parent templates.