Improve docs

This commit is contained in:
Ivan Shalganov 2014-01-08 01:05:52 +04:00
parent 7b87a88d16
commit cf8e25cd8f
1 changed files with 12 additions and 14 deletions

View File

@ -20,16 +20,17 @@ $fenom->setOptions($options);
Параметры могут быть массивом `'option_name' => true` (если ключ не указан автоматически задаётся false) или битовой маской.
* **disable_methods**, `Fenom::DENY_METHODS`, disable calling methods in templates. Any method call in the template will throw `Fenom\SecurityException`.
* **disable_native_funcs**, `Fenom::DENY_INLINE_FUNCS`, запретить использование PHP функций, кроме разрешенных.
* **auto_reload**, `Fenom::AUTO_RELOAD`, пересобирать шаблон если его оригинал был изменён (замедляет работу шаблонизатора).
* **force_compile**, `Fenom::FORCE_COMPILE`, пересобирать шаблон при каждом вызове (сильно замедляет работу шаблонизатора).
* **disable_cache**, `Fenom::DISABLE_CACHE`, не сохранять собранный шаблон на диск (сильно замедляет работу шаблонизатора).
* **force_include**, `Fenom::FORCE_INCLUDE`, оптимизировать вставку шаблона в шаблон. Это увеличит производительность и размер собранного шаблона.
Опция активируется если имя шаблона задано явно и скалярно.
* **auto_escape**, `Fenom::AUTO_ESCAPE`, все выводящие переменные и результаты функций будут экранироваться
* **auto_trim**, `Fenom::AUTO_TRIM`, при компиляции, все пробельные символы между тегами будут удлаены.
* **force_verify**, `Fenom::FORCE_VERIFY`, проверять обращение каждой переменной и возвращать NULL если переменной не существует.
| Code | Constant | Description | Affect |
| -------------------- | ------------------------- | ------------ | ------- |
| disable_methods | `Fenom::DENY_METHODS` | disable calling methods of objects in templates. | |
| disable_native_funcs | `Fenom::DENY_INLINE_FUNCS`| disable calling native function in templates, except allowed. | |
| auto_reload | `Fenom::AUTO_RELOAD` | reload template if source will be changed | decreases the performance |
| force_compile | `Fenom::FORCE_COMPILE` | recompile template every time when the template renders | greatly decreases performance |
| disable_cache | `Fenom::DISABLE_CACHE` | disable compile cache | greatly decreases performance |
| force_include | `Fenom::FORCE_INCLUDE` | paste template body instead of include-tag | increases performance, increases cache size |
| auto_escape | `Fenom::AUTO_ESCAPE` | html-escape each variables outputs | decreases performance |
| force_verify | `Fenom::FORCE_VERIFY` | check existence every used variable | decreases performance |
| auto_trim | `Fenom::AUTO_TRIM` | remove space-characters before and after tags | |
```php
$fenom->setOptions(array(
@ -40,10 +41,7 @@ $fenom->setOptions(array(
$fenom->setOptions(Fenom::AUTO_RELOAD | Fenom::FORCE_INCLUDE);
```
По умолчанию, все опции отключены.
**By default all options disabled**
### Tag options
## :raw
## :trim, :ltrim, :rtrim