You are here

function Smarty_Compiler::_parse_parenth_args in Quiz 6.6

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

parse arguments in function call parenthesis

Parameters

string $parenth_args:

Return value

string

1 call to Smarty_Compiler::_parse_parenth_args()
Smarty_Compiler::_parse_var in includes/moodle/lib/smarty/Smarty_Compiler.class.php
parse variable expression into PHP code

File

includes/moodle/lib/smarty/Smarty_Compiler.class.php, line 1817

Class

Smarty_Compiler
Template compiling class @package Smarty

Code

function _parse_parenth_args($parenth_args) {
  preg_match_all('~' . $this->_param_regexp . '~', $parenth_args, $match);
  $orig_vals = $match = $match[0];
  $this
    ->_parse_vars_props($match);
  $replace = array();
  for ($i = 0, $count = count($match); $i < $count; $i++) {
    $replace[$orig_vals[$i]] = $match[$i];
  }
  return strtr($parenth_args, $replace);
}