This commit is contained in:
Uwe Tews
2015-06-20 18:25:05 +02:00
parent afe79aac2e
commit 2d0f457abd

View File

@@ -15,6 +15,10 @@ Smarty 3.1.28
$smarty->registerFilter() does now accept closures. $smarty->registerFilter() does now accept closures.
- $smarty->registerFilter('pre', function($source) {return $source;}); - $smarty->registerFilter('pre', function($source) {return $source;});
If no optional filter name was specified it gets the default name 'closure'. If no optional filter name was specified it gets the default name 'closure'.
If you register multiple closures register each with a unique filter name.
- $smarty->registerFilter('pre', function($source) {return $source;}, 'clousre_1');
- $smarty->registerFilter('pre', function($source) {return $source;}, 'clousre_2');
Smarty 3.1.22 Smarty 3.1.22