public function processTemplateSetGlobals(Template $template, &$globals, $isFinalPass = false)
 {
     if ($this->benchmarkRendering) {
         $this->Benchmark->start('process-template-set-globals-' . $template->getName());
     }
     $templateSetGlobals = $template->getTemplateSetGlobals();
     $locals = $template->getLocals();
     foreach ($templateSetGlobals as $name => $value) {
         if (!is_array($value) && !is_object($value)) {
             $value = $this->parseFormatVariablesAndFilters($value, array_merge($locals, $globals), $isFinalPass);
             //                if (substr($value, 0, 1) == '%' && substr($value, -1) == '%' && strpos(substr($value, 1, -1), '%') === false)
             //                    $value = '';
         }
         // $this->globals[$name] = $value;
         $templateSetGlobals[$name] = $value;
     }
     if ($this->benchmarkRendering) {
         $this->Benchmark->end('process-template-set-globals-' . $template->getName());
     }
     return $templateSetGlobals;
 }