You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.0KB

  1. <?php
  2. /* @var $file string|null */
  3. /* @var $line integer|null */
  4. /* @var $class string|null */
  5. /* @var $method string|null */
  6. /* @var $index integer */
  7. /* @var $lines string[] */
  8. /* @var $begin integer */
  9. /* @var $end integer */
  10. /* @var $args array */
  11. /* @var $handler \yii\web\ErrorHandler */
  12. ?>
  13. <li class="<?php if ($index === 1 || !$handler->isCoreFile($file)) echo 'application'; ?> call-stack-item"
  14. data-line="<?= (int) ($line - $begin) ?>">
  15. <div class="element-wrap">
  16. <div class="element">
  17. <span class="item-number"><?= (int) $index ?>.</span>
  18. <span class="text"><?php if ($file !== null) echo 'in ' . $handler->htmlEncode($file); ?></span>
  19. <span class="at">
  20. <?php if ($line !== null) echo 'at line'; ?>
  21. <span class="line"><?php if ($line !== null) echo (int) $line + 1; ?></span>
  22. </span>
  23. <?php if ($method !== null): ?>
  24. <span class="call">
  25. <?php if ($file !== null) echo '&ndash;'; ?>
  26. <?= ($class !== null ? $handler->addTypeLinks("$class::$method") : $handler->htmlEncode($method)) . '(' . $handler->argumentsToString($args) . ')' ?>
  27. </span>
  28. <?php endif; ?>
  29. </div>
  30. </div>
  31. <?php if (!empty($lines)): ?>
  32. <div class="code-wrap">
  33. <div class="error-line"></div>
  34. <?php for ($i = $begin; $i <= $end; ++$i): ?><div class="hover-line"></div><?php endfor; ?>
  35. <div class="code">
  36. <?php for ($i = $begin; $i <= $end; ++$i): ?><span class="lines-item"><?= (int) ($i + 1) ?></span><?php endfor; ?>
  37. <pre><?php
  38. // fill empty lines with a whitespace to avoid rendering problems in opera
  39. for ($i = $begin; $i <= $end; ++$i) {
  40. echo (trim($lines[$i]) === '') ? " \n" : $handler->htmlEncode($lines[$i]);
  41. }
  42. ?></pre>
  43. </div>
  44. </div>
  45. <?php endif; ?>
  46. </li>