You are here

function Smarty::_run_mod_handler in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/lib/smarty/Smarty.class.php \Smarty::_run_mod_handler()

Handle modifiers

Parameters

string|null $modifier_name:

array|null $map_array:

Return value

string result of modifiers

File

includes/moodle/lib/smarty/Smarty.class.php, line 1670

Class

Smarty
@package Smarty

Code

function _run_mod_handler() {
  $_args = func_get_args();
  list($_modifier_name, $_map_array) = array_splice($_args, 0, 2);
  list($_func_name, $_tpl_file, $_tpl_line) = $this->_plugins['modifier'][$_modifier_name];
  $_var = $_args[0];
  foreach ($_var as $_key => $_val) {
    $_args[0] = $_val;
    $_var[$_key] = call_user_func_array($_func_name, $_args);
  }
  return $_var;
}