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


PHP XenForo_Application::disablePhpErrorHandler方法代码示例

本文整理汇总了PHP中XenForo_Application::disablePhpErrorHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Application::disablePhpErrorHandler方法的具体用法?PHP XenForo_Application::disablePhpErrorHandler怎么用?PHP XenForo_Application::disablePhpErrorHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XenForo_Application的用法示例。


在下文中一共展示了XenForo_Application::disablePhpErrorHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _renderTemplate

 protected function _renderTemplate($template, array $params = array())
 {
     extract($params);
     $compiler = new XenForo_Template_Compiler($template);
     XenForo_Application::disablePhpErrorHandler();
     @eval($compiler->compile());
     XenForo_Application::enablePhpErrorHandler();
     return htmlspecialchars_decode($__output, ENT_QUOTES);
 }
开发者ID:Mirovinger,项目名称:xenforo-simple-forms,代码行数:9,代码来源:Form.php

示例2: __construct

 public function __construct()
 {
     $startTime = microtime(true);
     $xf_path = Yii::getPathOfAlias('webroot') . '/forum';
     Yii::registerAutoloader(array('XenforeLoader', 'autoload'), true);
     XenForo_Autoloader::getInstance()->setupAutoloader($xf_path . '/library');
     XenForo_Application::initialize($xf_path . '/library', $xf_path);
     XenForo_Application::set('page_start_time', $startTime);
     XenForo_Application::disablePhpErrorHandler();
     error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE ^ E_WARNING);
     $dependencies = new XenForo_Dependencies_Public();
     $dependencies->preLoadData();
     XenForo_Session::startPublicSession();
     $this->visitor = XenForo_Visitor::getInstance();
     /*$fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
       ob_start();
       $fc->run();
       $content = ob_get_clean();*/
 }
开发者ID:ngdvan,项目名称:lntguitar,代码行数:19,代码来源:XfAuthentication.php

示例3: __construct

 /**
  * Default consturctor, instalizes XenForo classes and models.
  */
 public function __construct()
 {
     $this->xfDir = dirname(__FILE__);
     require_once $this->xfDir . '/library/XenForo/Autoloader.php';
     XenForo_Autoloader::getInstance()->setupAutoloader($this->xfDir . '/library');
     XenForo_Application::initialize($this->xfDir . '/library', $this->xfDir);
     XenForo_Application::set('page_start_time', microtime(TRUE));
     $deps = new XenForo_Dependencies_Public();
     $deps->preLoadData();
     // Disable XenForo's PHP error handler.
     XenForo_Application::disablePhpErrorHandler();
     // Enable error logging for PHP.
     error_reporting(E_ALL & ~E_NOTICE);
     $this->models = new Models();
     // TODO: Don't create models on init, only create them if they're being used (see Models::checkModel($model_name, $model)).
     $this->getModels()->setUserModel(XenForo_Model::create('XenForo_Model_User'));
     $this->getModels()->setAlertModel(XenForo_Model::create('XenForo_Model_Alert'));
     $this->getModels()->setUserFieldModel(XenForo_Model::create('XenForo_Model_UserField'));
     $this->getModels()->setAvatarModel(XenForo_Model::create('XenForo_Model_Avatar'));
     $this->getModels()->setModel('addon', XenForo_Model::create('XenForo_Model_AddOn'));
     $this->getModels()->setModel('database', XenForo_Application::get('db'));
     if ($this->hasAddon('XenResource') && $this->hasModel('XenResource_Model_Resource')) {
         $this->getModels()->setModel('resource', XenForo_Model::create('XenResource_Model_Resource'));
     }
 }
开发者ID:pritcham,项目名称:XenAPI,代码行数:28,代码来源:api.php

示例4: prepareMailContents

 /**
  * Prepares the subject, plain text body, and HTML body.
  *
  * @param string|null $emailTitle Title of email to send. If not specified, uses value from consructor.
  * @param array|null $params Params to pass to email template. If not specified, uses value from constructor.
  *
  * @return array|false False if the template can't be found; otherwise array with subject, bodyText, and bodyHtml keys
  */
 public function prepareMailContents($emailTitle = null, array $params = null)
 {
     if ($emailTitle === null) {
         $emailTitle = $this->_emailTitle;
     }
     if ($params === null) {
         $params = $this->_params;
     }
     $__template = $this->_loadEmailTemplate($emailTitle);
     if (!$__template) {
         return false;
     }
     $__defaultLanguage = XenForo_Template_Helper_Core::getDefaultLanguage();
     $__languages = XenForo_Application::get('languages');
     if (isset($__languages[$this->_languageId])) {
         XenForo_Template_Helper_Core::setDefaultLanguage($__languages[$this->_languageId]);
     }
     $xenOptions = XenForo_Application::get('options')->getOptions();
     extract($params);
     $__oldErrors = error_reporting(E_ALL & ~E_NOTICE);
     XenForo_Application::disablePhpErrorHandler();
     // these variables come from the $__template
     $__subject = $__bodyText = $__bodyHtml = '';
     eval($__template);
     XenForo_Application::enablePhpErrorHandler();
     error_reporting($__oldErrors);
     XenForo_Template_Helper_Core::setDefaultLanguage($__defaultLanguage);
     return array('subject' => $__subject, 'bodyText' => $__bodyText, 'bodyHtml' => $__bodyHtml);
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:37,代码来源:Mail.php

示例5: microtime

//******************************************************************************
// Pull instantiate and pull the template from the Xenforo system
//******************************************************************************
if (!is_admin()) {
    $XenDynamic_container = true;
    $startTime = microtime(true);
    $XenDynamic_indexFile = "../../../.." . getThemeOption("xenforo_path");
    $fileDir = dirname(__FILE__) . "/{$XenDynamic_indexFile}";
    //    $fileDir = ABSPATH . getThemeOption("xenforo_path");
    //	$fileDir = dirname(__FILE__) . "/../../../.." . getThemeOption("xenforo_path");
    if (!class_exists("XenForo_Autoloader")) {
        require $fileDir . '/library/XenForo/Autoloader.php';
        XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
        XenForo_Application::initialize($fileDir . '/library', $fileDir);
        XenForo_Application::set('page_start_time', $startTime);
        XenForo_Application::disablePhpErrorHandler();
        error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE ^ E_WARNING);
    }
    ob_start();
    $XenDynamic_fc = new RCBD_XenDynamic_FrontController(new XenForo_Dependencies_Public());
    $xenforoOutput = $XenDynamic_fc->runXenDynamic(ob_get_clean());
    global $templateParts;
    $templateParts = getTemplateParts($xenforoOutput, getThemeOption("xenforo_path"));
}
//******************************************************************************
// This function takes the raw buffer from Xenforo and breaks it into the header
// and the rest of the file it also does some jquery replacements for elements
// that need to be changed on all wordpress templates.
// RCBD TODO: It's ugly and I'm going to try to find a better way to do it.
//******************************************************************************
function getTemplateParts($buffer, $fileDir)
开发者ID:rberrill,项目名称:XenDynamic,代码行数:31,代码来源:xf_integration.php

示例6: prepareMailContents

 /**
  * Prepares the subject, plain text body, and HTML body.
  *
  * @param string|null $emailTitle Title of email to send. If not specified, uses value from consructor.
  * @param array|null $params Params to pass to email template. If not specified, uses value from constructor.
  *
  * @return array|false False if the template can't be found; otherwise array with subject, bodyText, and bodyHtml keys
  */
 public function prepareMailContents($emailTitle = null, array $params = null)
 {
     if ($emailTitle === null) {
         $emailTitle = $this->_emailTitle;
     }
     if ($params === null) {
         $params = $this->_params;
     }
     $__template = $this->_loadEmailTemplate($emailTitle);
     if (!$__template) {
         return false;
     }
     $__defaultLanguage = XenForo_Template_Helper_Core::getDefaultLanguage();
     $__languages = XenForo_Application::get('languages');
     if (isset($__languages[$this->_languageId])) {
         XenForo_Template_Helper_Core::setDefaultLanguage($__languages[$this->_languageId]);
     }
     $xenOptions = XenForo_Application::get('options')->getOptions();
     extract($params);
     $emailLanguage = XenForo_Template_Helper_Core::getDefaultLanguage();
     $emailIsRtl = isset($emailLanguage['text_direction']) && $emailLanguage['text_direction'] == 'RTL';
     $__oldErrors = error_reporting(E_ALL & ~E_NOTICE);
     XenForo_Application::disablePhpErrorHandler();
     // these variables come from the $__template
     $__subject = $__bodyText = $__bodyHtml = '';
     eval($__template);
     XenForo_Application::enablePhpErrorHandler();
     error_reporting($__oldErrors);
     XenForo_Template_Helper_Core::setDefaultLanguage($__defaultLanguage);
     if ($emailIsRtl) {
         $__bodyHtml = preg_replace_callback('/<rtlcss>(.*)<\\/rtlcss>/sU', array($this, '_replaceRtlCss'), $__bodyHtml);
     } else {
         $__bodyHtml = preg_replace('/<rtlcss>(.*)<\\/rtlcss>/sU', '\\1', $__bodyHtml);
     }
     return array('subject' => $__subject, 'bodyText' => $__bodyText, 'bodyHtml' => $__bodyHtml);
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:44,代码来源:Mail.php


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