Add docs (drafts)
This commit is contained in:
parent
3658bd0c93
commit
b713985c5e
|
@ -0,0 +1,3 @@
|
||||||
|
Callbacks
|
||||||
|
=========
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Parsing templates
|
||||||
|
=================
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Add template provider
|
||||||
|
=====================
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
Requirements and installation
|
||||||
|
=============================
|
||||||
|
|
||||||
|
Для установки через composer тебуется указать в `composer.json` вашего проекта
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"bzick/aspect": "0.9.*"
|
||||||
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/bzick/aspect.git"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Для работы шаблонизатора потребуется расширение tokenizer. Для загрузки классов используется `psr-0` формат.
|
|
@ -32,7 +32,6 @@ Conversation about [tags](./tags.md)
|
||||||
* [if](./tags/if.md), `elseif` and `else`
|
* [if](./tags/if.md), `elseif` and `else`
|
||||||
* [foreach](./tags/foreach.md), `foreaelse`, `break` and `continue`
|
* [foreach](./tags/foreach.md), `foreaelse`, `break` and `continue`
|
||||||
* [for](./tags/for.md), `forelse`, `break` and `continue`
|
* [for](./tags/for.md), `forelse`, `break` and `continue`
|
||||||
* [while](./tags/while.md), `break` and `continue`
|
|
||||||
* [switch](./tags/switch.md), `case`, `default` and `break`
|
* [switch](./tags/switch.md), `case`, `default` and `break`
|
||||||
* [cycle](./tags/cycle.md)
|
* [cycle](./tags/cycle.md)
|
||||||
* [include](./tags/include.md)
|
* [include](./tags/include.md)
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
Modifier |escape
|
||||||
|
================
|
||||||
|
|
||||||
|
Используется для кодирования / экранирования спецсимволов по алгоритмам экранирования HTML, URL'ов. По умолчанию активирован режим экранирования HTML.
|
||||||
|
|
||||||
|
```smarty
|
||||||
|
{$html_data|escape:'HTML'}
|
||||||
|
```
|
|
@ -0,0 +1,3 @@
|
||||||
|
Modifier |strip
|
||||||
|
===============
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Modifier |unescape
|
||||||
|
==================
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Tag {capture}
|
||||||
|
=============
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Tag {cycle}
|
||||||
|
===========
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Tag {extends}
|
||||||
|
=============
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
Tags {filter}
|
||||||
|
=============
|
||||||
|
|
||||||
|
Позволяет применить модификаторы на фрагмент шаблона
|
||||||
|
|
||||||
|
```smarty
|
||||||
|
{filter|strip_tags|truncate:80}
|
||||||
|
Remove all HTML <b>tags</b> and truncate text to 80 symbols
|
||||||
|
{/filter}
|
||||||
|
```
|
|
@ -0,0 +1,3 @@
|
||||||
|
Tag {switch}
|
||||||
|
============
|
||||||
|
|
Loading…
Reference in New Issue