<?php
class XenForo_Template_Compiler_Tag_Title implements XenForo_Template_Compiler_Tag_Interface
{
public function compile(XenForo_Template_Compiler $compiler, $tag, array $attributes, array $children, array $options)
{
if (empty($options['allowRawStatements']))
{
throw $compiler->getNewCompilerException(new XenForo_Phrase('x_tags_only_used_where_full_statements_allowed', array('tag' => 'title')));
}
$var = '__extraData[\'title\']';
$childOutput = $compiler->compileIntoVariable($children, $var, $options, false);
return $compiler->getNewRawStatement($childOutput);
}
}
上記のコードは、library\XenForo\Template\Compiler\Tag\Title.php から取得したものです。私はそれがどのように機能するかを理解しようとしています。例えば。、では、、、、、、とは<xen:title>Page Title</xen:title>
何ですか?$compiler
$tag
$attributes
$children
$options