Smarty v5 update test, initial code setup
This commit is contained in:
19
src/Compile/Modifier/LowerModifierCompiler.php
Normal file
19
src/Compile/Modifier/LowerModifierCompiler.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace Smarty\Compile\Modifier;
|
||||
/**
|
||||
* Smarty lower modifier plugin
|
||||
* Type: modifier
|
||||
* Name: lower
|
||||
* Purpose: convert string to lowercase
|
||||
*
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
class LowerModifierCompiler extends Base {
|
||||
|
||||
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
||||
return 'mb_strtolower((string) ' . $params[ 0 ] . ', \'' . addslashes(\Smarty\Smarty::$_CHARSET) . '\')';
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user