@@ -93,25 +93,26 @@ class Vtpl {
93
93
94
94
private $ variableFilters =
95
95
[
96
- 'capitalize ' => 'ucfirst($$0) ' ,
97
- 'cdata ' => 'CDATA_START . $$0. CDATA_END ' ,
98
- 'friendly_date ' => 'Vvveb\friendlyDate($$0) ' ,
99
- 'truncate ' => 'substr($$0, 0, $$1) ' ,
100
- 'truncate_words ' => 'Vvveb\truncateWords($$0,$$1) ' ,
101
- 'replace ' => 'str_replace($$1, $$2, $$0) ' ,
102
- 'uppercase ' => 'strtoupper($$0) ' ,
103
- 'lowercase ' => 'strtolower($$0) ' ,
104
- 'append ' => '$$1 . $$0 ' ,
105
- 'prepend ' => '$$0 . $$1 ' ,
106
- 'strip_html ' => 'strip_tags($$0) ' ,
107
- 'strip_newlines ' => 'str_replace("\n", \' \', $$0) ' ,
108
- 'mod ' => ['tag ' , 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) { ' , 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) { ' ],
109
- 'mod_class ' => ['class ' , '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?> ' ],
110
- 'conditional_class ' => ['class ' , '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?> ' ],
111
- 'iteration_class ' => ['class ' , '<?php if (@++$_iterc_@@__VTPL_rand()__@@ === (int)$$2) echo $$1;?> ' ],
112
- 'number_format ' => 'number_format($$0, $$1, $$2, $$3) ' ,
113
- 'only_decimals ' => 'substr($$0, (($_strpos = strrpos($$0, \'. \')) !== false)?$_strpos + 1:-100, ($_strpos !== false)?10:false) ' ,
114
- 'without_decimals ' => 'substr($$0, 0, strrpos($$0, \'. \')) ' ,
96
+ 'capitalize ' => 'ucfirst($$0) ' ,
97
+ 'cdata ' => 'CDATA_START . $$0. CDATA_END ' ,
98
+ 'friendly_date ' => 'Vvveb\friendlyDate($$0) ' ,
99
+ 'human_readable ' => 'Vvveb\humanReadable($$0) ' ,
100
+ 'truncate ' => 'substr($$0, 0, $$1) ' ,
101
+ 'truncate_words ' => 'Vvveb\truncateWords($$0,$$1) ' ,
102
+ 'replace ' => 'str_replace($$1, $$2, $$0) ' ,
103
+ 'uppercase ' => 'strtoupper($$0) ' ,
104
+ 'lowercase ' => 'strtolower($$0) ' ,
105
+ 'append ' => '$$1 . $$0 ' ,
106
+ 'prepend ' => '$$0 . $$1 ' ,
107
+ 'strip_html ' => 'strip_tags($$0) ' ,
108
+ 'strip_newlines ' => 'str_replace("\n", \' \', $$0) ' ,
109
+ 'mod ' => ['tag ' , 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) { ' , 'if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) { ' ],
110
+ 'mod_class ' => ['class ' , '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?> ' ],
111
+ 'conditional_class ' => ['class ' , '<?php if (@++$_modc_@@__VTPL_rand()__@@ % (int)$$1 === (int)$$2) echo $$0;?> ' ],
112
+ 'iteration_class ' => ['class ' , '<?php if (@++$_iterc_@@__VTPL_rand()__@@ === (int)$$2) echo $$1;?> ' ],
113
+ 'number_format ' => 'number_format($$0, $$1, $$2, $$3) ' ,
114
+ 'only_decimals ' => 'substr($$0, (($_strpos = strrpos($$0, \'. \')) !== false)?$_strpos + 1:-100, ($_strpos !== false)?10:false) ' ,
115
+ 'without_decimals ' => 'substr($$0, 0, strrpos($$0, \'. \')) ' ,
115
116
];
116
117
117
118
private $ attributesIndex = 0 ;
0 commit comments