| @@ 137-148 (lines=12) @@ | ||
| 134 | } |
|
| 135 | } |
|
| 136 | ||
| 137 | public function ideLink($file, $line) |
|
| 138 | { |
|
| 139 | $shortenedPath = $this->escape(Kint::shortenPath($file)); |
|
| 140 | if (!$this->file_link_format) { |
|
| 141 | return $shortenedPath.':'.$line; |
|
| 142 | } |
|
| 143 | ||
| 144 | $ideLink = Kint::getIdeLink($file, $line); |
|
| 145 | $class = (strpos($ideLink, 'http://') === 0) ? 'class="kint-ide-link" ' : ''; |
|
| 146 | ||
| 147 | return "<a {$class}href=\"{$ideLink}\">{$shortenedPath}:{$line}</a>"; |
|
| 148 | } |
|
| 149 | ||
| 150 | public function escape($string, $encoding = false) |
|
| 151 | { |
|
| @@ 497-508 (lines=12) @@ | ||
| 494 | } |
|
| 495 | } |
|
| 496 | ||
| 497 | protected function ideLink($file, $line) |
|
| 498 | { |
|
| 499 | $shortenedPath = $this->escape(Kint::shortenPath($file)); |
|
| 500 | if (!$this->file_link_format) { |
|
| 501 | return $shortenedPath.':'.$line; |
|
| 502 | } |
|
| 503 | ||
| 504 | $ideLink = Kint::getIdeLink($file, $line); |
|
| 505 | $class = (strpos($ideLink, 'http://') === 0) ? 'class="kint-ide-link" ' : ''; |
|
| 506 | ||
| 507 | return "<a {$class}href=\"{$ideLink}\">{$shortenedPath}:{$line}</a>"; |
|
| 508 | } |
|
| 509 | } |
|
| 510 | ||