| @@ 455-466 (lines=12) @@ | ||
| 452 | return $string; |
|
| 453 | } |
|
| 454 | ||
| 455 | protected function getPlugin(array $plugins, array $hints) |
|
| 456 | { |
|
| 457 | if ($plugins = $this->matchPlugins($plugins, $hints)) { |
|
| 458 | $plugin = end($plugins); |
|
| 459 | ||
| 460 | if (!isset($this->plugin_objs[$plugin])) { |
|
| 461 | $this->plugin_objs[$plugin] = new $plugin($this); |
|
| 462 | } |
|
| 463 | ||
| 464 | return $this->plugin_objs[$plugin]; |
|
| 465 | } |
|
| 466 | } |
|
| 467 | ||
| 468 | public function ideLink($file, $line) |
|
| 469 | { |
|
| @@ 308-319 (lines=12) @@ | ||
| 305 | return $this->escape(Kint::shortenPath($file)).':'.$line; |
|
| 306 | } |
|
| 307 | ||
| 308 | protected function getPlugin(array $plugins, array $hints) |
|
| 309 | { |
|
| 310 | if ($plugins = $this->matchPlugins($plugins, $hints)) { |
|
| 311 | $plugin = end($plugins); |
|
| 312 | ||
| 313 | if (!isset($this->plugin_objs[$plugin])) { |
|
| 314 | $this->plugin_objs[$plugin] = new $plugin($this); |
|
| 315 | } |
|
| 316 | ||
| 317 | return $this->plugin_objs[$plugin]; |
|
| 318 | } |
|
| 319 | } |
|
| 320 | ||
| 321 | public function escape($string, $encoding = false) |
|
| 322 | { |
|