Smarty v5 update test, initial code setup
This commit is contained in:
18
src/Compile/Modifier/StringFormatModifierCompiler.php
Normal file
18
src/Compile/Modifier/StringFormatModifierCompiler.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Smarty\Compile\Modifier;
|
||||
/**
|
||||
* Smarty string_format modifier plugin
|
||||
* Type: modifier
|
||||
* Name: string_format
|
||||
* Purpose: format strings via sprintf
|
||||
*
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
class StringFormatModifierCompiler extends Base {
|
||||
|
||||
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
||||
return 'sprintf(' . $params[ 1 ] . ',' . $params[ 0 ] . ')';
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user