aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php')
-rw-r--r--vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php
new file mode 100644
index 000000000..18eb7a762
--- /dev/null
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.str_repeat.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+/**
+ * Smarty str_repeat modifier plugin
+ * Type: modifier
+ * Name: str_repeat
+ * Purpose: returns string repeated times times
+ *
+ * @link https://www.smarty.net/docs/en/language.modifier.str_repeat.tpl str_repeat (Smarty online manual)
+ *
+ * @param array $params parameters
+ *
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_str_repeat($params) {
+ return 'str_repeat((string) ' . $params[0] . ', (int) ' . $params[1] . ')';
+}