diff --git a/CHANGELOG.md b/CHANGELOG.md index 4893020..1e21f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ Changelog ========= -## 2.0.0RC1 +### 2.0.1 (2013-06-09) + +- Fix string concatenation. If `~` in the end of expression Fenom generates broken template. +- Fix `~=` operator. Operator was not working. +- Tests++ +- Docs++ + +## 2.0.0 - Add tag the {filter} - Redesign `extends` algorithm: diff --git a/README.md b/README.md index 087c319..3681c53 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Fenom - Template Engine for PHP =============================== > Composer [package](https://packagist.org/packages/fenom/fenom): `{"fenom/fenom": "2.*"}`.
-> For old version: `{"fenom/fenom": "1.*"}`. [List](https://github.com/bzick/fenom/wiki/Migrate-from-1.*-to-2.*) of incompatibilities between 1.* and 2.* versions. +> For old version: `{"fenom/fenom": "1.*"}`. [List](https://github.com/bzick/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) -[![Build Status](https://travis-ci.org/bzick/fenom.svg?branch=develop)](https://travis-ci.org/bzick/fenom) -[![Coverage Status](https://coveralls.io/repos/bzick/fenom/badge.png?branch=develop)](https://coveralls.io/r/bzick/fenom?branch=master) +[![Build Status](https://travis-ci.org/bzick/fenom.svg?branch=master)](https://travis-ci.org/bzick/fenom) +[![Coverage Status](https://coveralls.io/repos/bzick/fenom/badge.png?branch=master)](https://coveralls.io/r/bzick/fenom?branch=master) [![Total Downloads](https://poser.pugx.org/fenom/fenom/downloads.png)](https://packagist.org/packages/fenom/fenom) ## [Quick start](./docs/start.md) :: [Documentation](./docs/readme.md) :: [Benchmark](./docs/benchmark.md) @@ -15,7 +15,7 @@ Fenom - Template Engine for PHP **Fenom** *(from "fenomenal")* — lightweight template engine for PHP. -It mean: +It means: * Known Smarty-like [syntax](./docs/syntax.md) with improvements. * Very [fast](./docs/benchmark.md). @@ -23,7 +23,7 @@ It mean: * Very [flexible](./docs/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/dev.md). +* Easy to understand [how it works](./docs/dev/readme.md). * Easy to [use](./docs/start.md). * Maximum [protection](./docs/configuration.md#configure). diff --git a/docs/configuration.md b/docs/configuration.md index 54a2420..83bed60 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -34,7 +34,7 @@ Options may by associative array like `'option_name' => true` or bitwise mask. | *force_verify* | `Fenom::FORCE_VERIFY` | check existence every used variable | decreases performance | | *disable_statics* | `Fenom::DENY_STATICS` | disable calling static methods in templates. | | -| *strip* | `Fenom::STRIP` | strip all whitespaces in templates. | decrease cache size | +| *strip* | `Fenom::AUTO_STRIP` | strip all whitespaces in templates. | decrease cache size | ```php $fenom->setOptions(array( @@ -50,46 +50,12 @@ By default all options disabled ## Extends -### Template providers [TRANSLATE] +### Template providers Бывает так что шаблны не хранятся на файловой сиситеме, а хранятся в некотором хранилище, например, в базе данных MySQL. В этом случае шаблонизатору нужно описать как забирать шаблоны из хранилища, как проверять дату изменения шаблона и где хранить кеш шаблонов (опционально). Эту задачу берут на себя Providers, это объекты реальзующие интерфейс `Fenom\ProviderInterface`. -### Cache providers [TRANSLATE] - -Изначально Fenom не расчитывался на то что кеш скомпиленых шаблонов может располагаться не на файловой системе. -Однако, в теории, есть возможность реализовать свое кеширование для скомпиленых шаблонов без переопределения шаблонизатора. -Речь идет о своем протоколе, отличным от `file://`, который [можно определить](http://php.net/manual/en/class.streamwrapper.php) в PHP. - -Ваш протол должени иметь класс реализации протокола как указан в документации [Stream Wrapper](http://www.php.net/manual/en/class.streamwrapper.php). -Класс протокола может иметь не все указанные в документации методы. Вот список методов, необходимых шаблонизатору: - -* [CacheStreamWrapper::stream_open](http://www.php.net/manual/en/streamwrapper.stream-open.php) -* [CacheStreamWrapper::stream_write](http://www.php.net/manual/en/streamwrapper.stream-write.php) -* [CacheStreamWrapper::stream_close](http://www.php.net/manual/en/streamwrapper.stream-close.php) -* [CacheStreamWrapper::rename](http://www.php.net/manual/en/streamwrapper.rename.php) - -For `include`: - -* [CacheStreamWrapper::stream_stat](http://www.php.net/manual/en/streamwrapper.stream-stat.php) -* [CacheStreamWrapper::stream_read](http://www.php.net/manual/en/streamwrapper.stream-read.php) -* [CacheStreamWrapper::stream_eof](http://www.php.net/manual/en/streamwrapper.stream-eof.php) - -**Note** -(On 2014-05-13) Zend OpCacher doesn't support custom protocols except `file://` and `phar://`. - -For example, - -```php -$this->setCacheDir("redis://hash/compiled/"); -``` - -* `$cache = fopen("redis://hash/compiled/XnsbfeDnrd.php", "w");` -* `fwrite($cache, "...