/** * Returns a contextized, usually escaped, output node. * * @param ezcTemplateOutputAstNode $type * @return ezcTemplateOutputAstNode */ public function visitOutputAstNode(ezcTemplateOutputAstNode $type) { parent::visitOutputAstNode($type); if ($type->isRaw) { return $type; } return $this->context->transformOutput($type->expression); }
/** * Finds the compiled file based on the stream path and template options. * * Returns the compiled code object which can be used for execution or queried for more info. * * @param string $location The stream path of the requested template file. * @param ezcTemplateOutputContext $context The current output context handler. * @param ezcTemplateManager $template The template which contains the current settings. * @return ezcTemplateCompiledCode */ public static function findCompiled($location, ezcTemplateOutputContext $context, ezcTemplate $template) { $options = 'ezcTemplate::options(' . false . '-' . false . ')'; $identifier = md5('ezcTemplateCompiled(' . $location . ')'); $name = basename($location, '.ezt'); $path = $template->configuration->compilePath . DIRECTORY_SEPARATOR . $template->configuration->compiledTemplatesPath . DIRECTORY_SEPARATOR . $context->identifier() . '-' . $template->generateOptionHash() . '/' . $name . '-' . $identifier . ".php"; return new ezcTemplateCompiledCode($identifier, $path, $context, $template); }