當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XenForo_Application::enablePhpErrorHandler方法代碼示例

本文整理匯總了PHP中XenForo_Application::enablePhpErrorHandler方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Application::enablePhpErrorHandler方法的具體用法?PHP XenForo_Application::enablePhpErrorHandler怎麽用?PHP XenForo_Application::enablePhpErrorHandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XenForo_Application的用法示例。


在下文中一共展示了XenForo_Application::enablePhpErrorHandler方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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

示例3: 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::enablePhpErrorHandler方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。