本文整理汇总了PHP中dir::template方法的典型用法代码示例。如果您正苦于以下问题:PHP dir::template方法的具体用法?PHP dir::template怎么用?PHP dir::template使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dir
的用法示例。
在下文中一共展示了dir::template方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTemplate
public function getTemplate()
{
ob_start();
$content = self::generateArticle($this->get('id'));
$content = extension::get('FRONTEND_OUTPUT', $content);
dyn::add('content', $content);
include dir::template(dyn::get('template'), $this->get('template'));
$content = ob_get_contents();
ob_end_clean();
return $content;
}
示例2: getTemplate
public function getTemplate()
{
ob_start();
if (!pageCache::exist($this->get('id'))) {
pageCache::generateArticle($this->get('id'));
}
$content = pageCache::read($this->get('id'));
$content = pageArea::getEval($content);
$content = extension::get('FRONTEND_OUTPUT', $content);
dyn::add('content', $content);
include dir::template(dyn::get('template'), $this->get('template'));
$content = ob_get_contents();
ob_end_clean();
return $content;
}
示例3: opendir
$field = $form->addTextField('hp_name', dyn::get('hp_name'));
$field->fieldName(lang::get('settings_name_of_site'));
$field = $form->addTextField('hp_url', dyn::get('hp_url'));
$field->fieldName(lang::get('settings_url_of_site'));
$field = $form->addSelectField('lang', dyn::get('lang'));
$field->fieldName(lang::get('settings_backend_lang'));
$handle = opendir(dir::backend('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR));
while ($file = readdir($handle)) {
if (in_array($file, ['.', '..'])) {
continue;
}
$field->add($file, $file);
}
$field = $form->addSelectField('template', dyn::get('template'));
$field->fieldName(lang::get('template'));
$handle = opendir(dir::template());
while ($file = readdir($handle)) {
if (in_array($file, ['.', '..'])) {
continue;
}
$field->add($file, $file);
}
$field = $form->addLinkField('start_page', dyn::get('start_page'));
$field->fieldName(lang::get('start_page'));
$field = $form->addLinkField('error_page', dyn::get('error_page'));
$field->fieldName(lang::get('error_page'));
echo $form->show();
?>
</div>
</div>
</div>
示例4: __construct
public function __construct($template)
{
$this->name = $template;
$configfile = dir::template($template, 'config.json');
$this->config = json_decode(file_get_contents($configfile), true);
}