From afe79aac2ecc5784f9b8c6351332bdbe9ce8174a Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Fri, 19 Jun 2015 03:21:52 +0200 Subject: - improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59 --- NEW_FEATURES.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'NEW_FEATURES.txt') diff --git a/NEW_FEATURES.txt b/NEW_FEATURES.txt index b2c18c99..d08c830f 100644 --- a/NEW_FEATURES.txt +++ b/NEW_FEATURES.txt @@ -2,6 +2,20 @@ This file contains a brief description of new features which have been added to Smarty 3.1 +Smarty 3.1.28 + + Filter support + ============== + Optional filter names + An optional filter name was added to $smarty->registerFilter(). It can be used to unregister a filter by name. + - $smarty->registerFilter('output', $callback, 'name'); + $smarty->unregister('output', 'name'); + + Closures + $smarty->registerFilter() does now accept closures. + - $smarty->registerFilter('pre', function($source) {return $source;}); + If no optional filter name was specified it gets the default name 'closure'. + Smarty 3.1.22 Namespace support within templates -- cgit v1.3