You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty_internal_method_setdefaultmodifiers.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Smarty Method SetDefaultModifiers
  4. *
  5. * Smarty::setDefaultModifiers() method
  6. *
  7. * @package Smarty
  8. * @subpackage PluginsInternal
  9. * @author Uwe Tews
  10. */
  11. class Smarty_Internal_Method_SetDefaultModifiers
  12. {
  13. /**
  14. * Valid for Smarty and template object
  15. *
  16. * @var int
  17. */
  18. public $objMap = 3;
  19. /**
  20. * Set default modifiers
  21. *
  22. * @api Smarty::setDefaultModifiers()
  23. *
  24. * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
  25. * @param array|string $modifiers modifier or list of modifiers
  26. * to set
  27. *
  28. * @return \Smarty|\Smarty_Internal_Template
  29. */
  30. public function setDefaultModifiers(Smarty_Internal_TemplateBase $obj, $modifiers)
  31. {
  32. $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
  33. $smarty->default_modifiers = (array) $modifiers;
  34. return $obj;
  35. }
  36. }