This example shows using tag callbacks to call php functions or methods.
In this example we use the default text "Some text for example"
- Standard tags look like {tagname} or {tagarray.indexname} for arrays
- Tags with comments look like {tagname# Comment} or {tagname # Comment}
- Tags with callbacks look like {tagname|function} (using vertical bar or pipe symbol)
- They can all be combined {tagarray.indexname|function#Comment}
- Simple callback {example1|strtoupper}: SOME TEXT FOR EXAMPLE 1
- Simple callback (same tag different callback) {example1|strtolower}: some text for example 1
- Chained callbacks {example2|strtolower|ucwords}: Some Text For Example 2
- Multi-parameter callback {example3|str_replace('Some', 'Replaced', %s)}: Replaced text for example 3
- Subclassed method callback {example4|my_custom_callback}: Some text for example 4
- Taking things to the limit {example5|strtolower|ucwords|str_replace('Some', 'Replaced', %s)|my_custom_callback}: Replaced Text For Example 5