2013-02-07 17:37:16 +04:00
|
|
|
Documentation
|
|
|
|
=============
|
|
|
|
|
2014-05-14 17:07:48 +04:00
|
|
|
**Please, help translate documentation to english or fix typos. [Read more](./helpme.md).**
|
|
|
|
|
2013-06-28 11:53:53 +04:00
|
|
|
### Fenom
|
2013-02-07 17:37:16 +04:00
|
|
|
|
2014-05-14 17:07:48 +04:00
|
|
|
* [Quick start](./start.md)
|
|
|
|
* [Usage](./start.md#install-fenom)
|
|
|
|
* [Framework adapters](./adapters.md)
|
|
|
|
* [For developers](./dev/readme.md)
|
2014-05-19 10:15:00 +04:00
|
|
|
* [Configuration](./configuration.md)
|
2013-07-23 12:32:06 +04:00
|
|
|
* [Syntax](./syntax.md)
|
2013-02-19 09:51:33 +04:00
|
|
|
* [Operators](./operators.md)
|
2013-02-07 17:37:16 +04:00
|
|
|
|
2014-06-18 17:21:29 +04:00
|
|
|
***
|
|
|
|
|
|
|
|
### Tags
|
|
|
|
|
|
|
|
[Usage](./syntax.md#tags)
|
|
|
|
|
|
|
|
* [var](./tags/var.md) — define variable
|
|
|
|
* [if](./tags/if.md), `elseif` and `else` — conditional statement
|
|
|
|
* [foreach](./tags/foreach.md), `foreaelse`, `break` and `continue` — traversing items in an array or object
|
|
|
|
* [for](./tags/for.md), `forelse`, `break` and `continue` — loop statement
|
|
|
|
* [switch](./tags/switch.md), `case`, `default` —
|
|
|
|
* [cycle](./tags/cycle.md) — cycles on an array of values
|
|
|
|
* [include](./tags/include.md), `insert` — includes and evaluates the specified template
|
|
|
|
* [extends](./tags/extends.md), `use`, `block` and `parent` — template inheritance
|
|
|
|
* [filter](./tags/filter.md) — apply modifier on a block of template data
|
|
|
|
* [ignore](./tags/ignore.md) — ignore Fenom syntax
|
|
|
|
* [macro](./tags/macro.md) and `import` — template functions
|
|
|
|
* [autoescape](./tags/autoescape.md) — escape template fragment
|
|
|
|
* [raw](./tags/raw.md) — unescape template fragment
|
2014-06-28 22:17:52 +04:00
|
|
|
* [unset](./tags/unset.md) — unset a given variables
|
2014-06-18 17:21:29 +04:00
|
|
|
* or [add](./ext/extend.md#add-tags) yours
|
|
|
|
|
|
|
|
|
2013-06-08 00:08:00 +04:00
|
|
|
***
|
|
|
|
|
2013-02-27 11:03:47 +04:00
|
|
|
### Modifiers
|
2013-02-07 17:37:16 +04:00
|
|
|
|
2013-05-30 19:00:00 +04:00
|
|
|
[Usage](./syntax.md#modifiers)
|
|
|
|
|
2014-05-14 17:07:48 +04:00
|
|
|
* [upper](./mods/upper.md) aka `up` — convert to uppercase a string
|
|
|
|
* [lower](./mods/lower.md) aka `low` — convert to lowercase a string
|
|
|
|
* [date_format](./mods/date_format.md) - format date, timestamp via strftime() function
|
|
|
|
* [date](./mods/date.md) - format date, timestamp via date() function
|
|
|
|
* [truncate](./mods/truncate.md) — truncate thee string to specified length
|
|
|
|
* [escape](./mods/escape.md) aka `e` — escape the string
|
|
|
|
* [unescape](./mods/unescape.md) — unescape the string
|
|
|
|
* [strip](./mods/strip.md) — remove extra whitespaces
|
|
|
|
* [length](./mods/length.md) — calculate length of string, array, object
|
|
|
|
* [in](./mods/in.md) — find value in string or array
|
2013-02-09 10:59:08 +04:00
|
|
|
* allowed functions: `json_encode`, `json_decode`, `count`, `is_string`, `is_array`, `is_numeric`, `is_int`, `is_object`,
|
|
|
|
`strtotime`, `gettype`, `is_double`, `ip2long`, `long2ip`, `strip_tags`, `nl2br`
|
2014-06-18 17:21:29 +04:00
|
|
|
* or [add](./ext/extend.md#add-modifiers) yours
|
2013-02-07 17:37:16 +04:00
|
|
|
|
2013-06-08 00:08:00 +04:00
|
|
|
***
|
|
|
|
|
2014-06-18 17:21:29 +04:00
|
|
|
### Operators
|
2013-05-30 19:00:00 +04:00
|
|
|
|
2014-06-18 17:21:29 +04:00
|
|
|
* [Arithmetic operators](./operators.md#arithmetic-operators) — `+`, `-`, `*`, `/`, `%`
|
|
|
|
* [Logical operators](./operators.md#logical-operators) — `||`, `&&`, `!$var`, `and`, `or`, `xor`
|
|
|
|
* [Comparison operators](./operators.md#comparison-operators) — `>`, `>=`, `<`, `<=`, `==`, `!=`, `!==`, `<>`
|
|
|
|
* [Bitwise operators](./operators.md#bitwise-operators) — `|`, `&`, `^`, `~$var`, `>>`, `<<`
|
|
|
|
* [Assignment operators](./operators.md#assignment-operators) — `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `&=`, `|=`, `^=`, `>>=`, `<<=`
|
|
|
|
* [String concatenation operator](./operators.md#string-operator) — `$str1 ~ $str2`
|
|
|
|
* [Ternary operators](./operators.md#ternary-operators) — `$a ? $b : $c`, `$a ! $b : $c`, `$a ?: $c`, `$a !: $c`
|
|
|
|
* [Check operators](./operators.md#check-operators) — `$var?`, `$var!`
|
2014-06-18 17:31:31 +04:00
|
|
|
* [Test operator](./operators.md#test-operator) — `is`, `is not`
|
2014-06-18 17:31:01 +04:00
|
|
|
* [Containment operator](./operators.md#containment-operator) — `in`, `not in`
|
2013-02-23 17:37:04 +04:00
|
|
|
|
2013-06-08 00:08:00 +04:00
|
|
|
***
|
|
|
|
|
2013-02-27 11:03:47 +04:00
|
|
|
### Extends
|
2013-02-07 17:37:16 +04:00
|
|
|
|
2014-06-18 17:21:29 +04:00
|
|
|
* [Extend Fenom](./ext/extend.md)
|
|
|
|
* [Add-ons](./ext/extensions.md)
|