本文整理汇总了PHP中Engine::initInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine::initInstance方法的具体用法?PHP Engine::initInstance怎么用?PHP Engine::initInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine
的用法示例。
在下文中一共展示了Engine::initInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetParserInstance
function GetParserInstance($engineType = null)
{
if (empty($engineType)) {
$engineType = $this->GetPreference('default_engine', Engine::$PARSDOWN);
}
return Engine::initInstance($engineType);
}
示例2: array
<?php
if (!function_exists('cmsms')) {
exit;
}
$itemsEngine = array("MICHELF" => Engine::$MICHELF, "MICHELF_EXTRA" => Engine::$MICHELF_EXTRA, "PARSDOWN" => Engine::$PARSDOWN);
$default_engine = $this->GetPreference('default_engine', Engine::$PARSDOWN);
//$process_smarty_security = $this->GetPreference('process_smarty_security',true);
$process_quote = $this->GetPreference('process_quote', true);
$process_img = $this->GetPreference('process_img', true);
$process_security = $this->GetPreference('process_security', true);
$process_codepre = $this->GetPreference('process_codepre', true);
$process_content = $this->GetPreference('process_content', true);
$smarty->assign("itemsEngine", $this->CreateInputDropdown($id, 'default_engine', $itemsEngine, -1, $default_engine));
//$smarty->assign('process_smarty_security',$process_smarty_security);
$smarty->assign('process_quote', $process_quote);
$smarty->assign('process_img', $process_img);
$smarty->assign('process_security', $process_security);
$smarty->assign('process_codepre', $process_codepre);
$smarty->assign('process_content', $process_content);
$smarty->assign('form_save', $this->CreateFormStart($id, 'admin_save'));
$text = file_get_contents(dirname(__FILE__) . '/default.md');
//echo $this->GetParserInstance()->process($text, true);
$text = Engine::initInstance()->process($text, true);
//Activate debug in admin part
$smarty->assign('text', $text);
echo $this->ProcessTemplate('admin.tpl');