funchat/core/template/src/Compile/Modifier/LowerModifierCompiler.php
2025-06-02 22:38:25 +02:00

19 lines
No EOL
463 B
PHP

<?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) . '\')';
}
}