aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php')
-rw-r--r--vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php b/vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php
new file mode 100644
index 000000000..c33af3299
--- /dev/null
+++ b/vendor/smarty/smarty/src/Compile/Modifier/StrRepeatModifierCompiler.php
@@ -0,0 +1,17 @@
+<?php
+namespace Smarty\Compile\Modifier;
+/**
+ * Smarty str_repeat modifier plugin
+ * Type: modifier
+ * Name: str_repeat
+ * Purpose: returns string repeated times times
+ *
+ */
+
+class StrRepeatModifierCompiler extends Base {
+
+ public function compile($params, \Smarty\Compiler\Template $compiler) {
+ return 'str_repeat((string) ' . $params[0] . ', (int) ' . $params[1] . ')';
+ }
+
+} \ No newline at end of file