当前位置: 首页>>代码示例>>PHP>>正文


PHP Engine::initInstance方法代码示例

本文整理汇总了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);
 }
开发者ID:ajprog,项目名称:markdown,代码行数:7,代码来源:Parser.module.php

示例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');
开发者ID:ajprog,项目名称:markdown,代码行数:27,代码来源:action.defaultadmin.php


注:本文中的Engine::initInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。