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


PHP Helpers::getSource方法代码示例

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


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

示例1: render

 /**
  * Renders blue screen.
  * @param  \Exception|\Throwable
  * @return void
  */
 public function render($exception)
 {
     $panels = $this->panels;
     $info = array_filter($this->info);
     $source = Helpers::getSource();
     $sourceIsUrl = preg_match('#^https?://#', $source);
     $title = $exception instanceof \ErrorException ? Helpers::errorTypeToString($exception->getSeverity()) : get_class($exception);
     $skipError = $sourceIsUrl && $exception instanceof \ErrorException && !empty($exception->skippable) ? $source . (strpos($source, '?') ? '&' : '?') . '_tracy_skip_error' : NULL;
     require __DIR__ . '/assets/BlueScreen/bluescreen.phtml';
 }
开发者ID:VasekPurchart,项目名称:tracy,代码行数:15,代码来源:BlueScreen.php

示例2: renderTemplate

 private function renderTemplate($exception, $template)
 {
     $info = array_filter($this->info);
     $source = Helpers::getSource();
     $sourceIsUrl = preg_match('#^https?://#', $source);
     $title = $exception instanceof \ErrorException ? Helpers::errorTypeToString($exception->getSeverity()) : Helpers::getClass($exception);
     $skipError = $sourceIsUrl && $exception instanceof \ErrorException && !empty($exception->skippable) ? $source . (strpos($source, '?') ? '&' : '?') . '_tracy_skip_error' : NULL;
     $lastError = $exception instanceof \ErrorException || $exception instanceof \Error ? NULL : error_get_last();
     $dump = function ($v) {
         return Dumper::toHtml($v, [Dumper::DEPTH => $this->maxDepth, Dumper::TRUNCATE => $this->maxLength, Dumper::LIVE => TRUE, Dumper::LOCATION => Dumper::LOCATION_CLASS]);
     };
     require $template;
 }
开发者ID:manGoweb,项目名称:mnamGo,代码行数:13,代码来源:BlueScreen.php

示例3: defaultMailer

 /**
  * Default mailer.
  * @param  string|\Exception|\Throwable
  * @param  string
  * @return void
  * @internal
  */
 public function defaultMailer($message, $email)
 {
     $host = preg_replace('#[^\\w.-]+#', '', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : php_uname('n'));
     $parts = str_replace(["\r\n", "\n"], ["\n", PHP_EOL], ['headers' => implode("\n", ['From: ' . ($this->fromEmail ?: "noreply@{$host}"), 'X-Mailer: Tracy', 'Content-Type: text/plain; charset=UTF-8', 'Content-Transfer-Encoding: 8bit']) . "\n", 'subject' => "PHP: An error occurred on the server {$host}", 'body' => $this->formatMessage($message) . "\n\nsource: " . Helpers::getSource()]);
     mail($email, $parts['subject'], $parts['body'], $parts['headers']);
 }
开发者ID:janlanger,项目名称:tracy,代码行数:13,代码来源:Logger.php


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