private function parseCalcs($content) { if (preg_match_all(sprintf(self::VAR_MATCH, '=(.+?)'), $content, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { eval('$value = ' . $match[1] . ';'); $function = isset($match[2]) ? $match[2] : ''; $value = View::protect($value, $function); $content = str_replace($match[0], $value, $content); } } return $content; }