public function doReplacements($value, $matches, $type)
    {
        $replacements = array();
        for ($i = 0; $i <= (count($matches[0]) - 1); $i++) {
            $replacement = $this->fetchVariable($matches[1][$i], $type);
            $replacements[$matches[0][$i]] = $replacement;
        }

        if (!empty($replacements)) {
            $value = strtr($value, $replacements);
        }

        return $value;
    }
public function doReplacements($value, $matches, $type)
    {
        $replacements = array();
        for ($i = 0; $i <= (count($matches[0]) - 1); $i++) {
            $replacement = $this->fetchVariable($matches[1][$i], $type);
            $replacements[$matches[0][$i]] = $replacement;
        }

        if (!empty($replacements)) {
            $value = strtr($value, $replacements);
        }

        return $value;
    }
public function doReplacements ( $ value , $ matches , $ type ) { $ replacements = array ( ) ; for ( $ i = 0 ; $ i <= ( count ( $ matches [ 0 ] ) - 1 ) ; $ i ++ ) { $ replacement = $ this -> fetchVariable ( $ matches [ 1 ] [ $ i ] , $ type ) ; $ replacements [ $ matches [ 0 ] [ $ i ] ] = $ replacement ; } if ( ! empty ( $ replacements ) ) { $ value = strtr ( $ value , $ replacements ) ; } return $ value ; }
Does the replacements in the string for the variable

@param string $value   The string to parse
@param array  $matches The matches
@param string $type    The variable type

@return string The parsed variable
Does the replacements in the string for the variable