/packages/Output/Smarty/Core/plugins/modifiercompiler.cat.php

https://bitbucket.org/alexamiryan/stingle · PHP · 29 lines · 5 code · 1 blank · 23 comment · 0 complexity · 4158252d9e94f19c059a6691b9475f8b MD5 · raw file

  1. <?php
  2. /**
  3. * Smarty plugin
  4. *
  5. * @package Smarty
  6. * @subpackage PluginsModifierCompiler
  7. */
  8. /**
  9. * Smarty cat modifier plugin
  10. * Type: modifier<br>
  11. * Name: cat<br>
  12. * Date: Feb 24, 2003<br>
  13. * Purpose: catenate a value to a variable<br>
  14. * Input: string to catenate<br>
  15. * Example: {$var|cat:"foo"}
  16. *
  17. * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
  18. * (Smarty online manual)
  19. * @author Uwe Tews
  20. *
  21. * @param array $params parameters
  22. *
  23. * @return string with compiled code
  24. */
  25. function smarty_modifiercompiler_cat($params)
  26. {
  27. return '(' . implode(').(', $params) . ')';
  28. }