mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-08 14:32:11 +02:00
19 lines
426 B
PHP
19 lines
426 B
PHP
<?php
|
|
namespace Smarty\Compile\Modifier;
|
|
/**
|
|
* Smarty upper modifier plugin
|
|
* Type: modifier
|
|
* Name: lower
|
|
* Purpose: convert string to uppercase
|
|
*
|
|
* @author Uwe Tews
|
|
*/
|
|
|
|
class UpperModifierCompiler extends Base {
|
|
|
|
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
|
return 'mb_strtoupper((string) ' . $params[ 0 ] . ' ?? \'\', \'' . addslashes(\Smarty\Smarty::$_CHARSET) . '\')';
|
|
}
|
|
|
|
}
|