本文整理汇总了PHP中eZTemplate::setIsDebugEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP eZTemplate::setIsDebugEnabled方法的具体用法?PHP eZTemplate::setIsDebugEnabled怎么用?PHP eZTemplate::setIsDebugEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZTemplate
的用法示例。
在下文中一共展示了eZTemplate::setIsDebugEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: factory
/**
* Returns a shared instance of the eZTemplate class with
* default settings applied, like:
* - Autoload operators loaded
* - Debug mode set
* - eZTemplateDesignResource::instance registered
*
* @since 4.3
* @return eZTemplate
*/
public static function factory()
{
if (self::$factory === false) {
$instance = self::instance();
$ini = eZINI::instance();
if (!isset($GLOBALS['eZTemplateDebugInternalsEnabled']) && $ini->variable('TemplateSettings', 'Debug') == 'enabled') {
eZTemplate::setIsDebugEnabled(true);
}
$compatAutoLoadPath = $ini->variableArray('TemplateSettings', 'AutoloadPath');
$autoLoadPathList = $ini->variable('TemplateSettings', 'AutoloadPathList');
$extensionAutoloadPath = $ini->variable('TemplateSettings', 'ExtensionAutoloadPath');
$extensionPathList = eZExtension::expandedPathList($extensionAutoloadPath, 'autoloads/');
$autoLoadPathList = array_unique(array_merge($compatAutoLoadPath, $autoLoadPathList, $extensionPathList));
$instance->setAutoloadPathList($autoLoadPathList);
$instance->autoload();
$instance->registerResource(eZTemplateDesignResource::instance());
self::$factory = true;
}
return self::instance();
}
示例2:
* @package kernel
*/
$GLOBALS['eZSiteBasics']['no-cache-adviced'] = false;
// Avoid compiling templates just for 1 view to improve performance
$GLOBALS['eZTemplateCompilerSettings']['compile'] = false;
// Include common functions
include_once "kernel/setup/ezsetupcommon.php";
include_once "kernel/setup/ezsetuptests.php";
include_once 'kernel/setup/ezsetup_summary.php';
// Initialize template
$tpl = eZTemplate::instance();
//$tpl->registerFunction( "section", new eZTemplateSectionFunction( "section" ) );
//$tpl->registerFunction( "include", new eZTemplateIncludeFunction() );
$ini = eZINI::instance();
if ($ini->variable('TemplateSettings', 'Debug') == 'enabled') {
eZTemplate::setIsDebugEnabled(true);
}
//eZDebug::setLogOnly( true );
//$ini->setVariable( 'RegionalSettings', 'TextTranslation', 'disabled' );
$Module = $Params['Module'];
$tpl->setAutoloadPathList($ini->variable('TemplateSettings', 'AutoloadPathList'));
$tpl->autoload();
$tpl->registerResource(eZTemplateDesignResource::instance());
// Initialize HTTP variables
$http = eZHTTPTool::instance();
$baseDir = 'kernel/setup/';
// Load step list data. See this file for install step references.
$stepDataFile = $baseDir . "steps/ezstep_data.php";
$stepData = null;
if (file_exists($stepDataFile)) {
include_once $stepDataFile;