| @@ 93-126 (lines=34) @@ | ||
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | public function preRender() |
|
| 94 | { |
|
| 95 | $output = ''; |
|
| 96 | ||
| 97 | if (!self::$been_run || $this->mod_return) { |
|
| 98 | foreach (self::$pre_render_sources as $type => $values) { |
|
| 99 | $contents = ''; |
|
| 100 | foreach ($values as $v) { |
|
| 101 | $contents .= call_user_func($v, $this); |
|
| 102 | } |
|
| 103 | ||
| 104 | if (!strlen($contents)) { |
|
| 105 | continue; |
|
| 106 | } |
|
| 107 | ||
| 108 | switch ($type) { |
|
| 109 | case 'script': |
|
| 110 | $output .= '<script class="kint-script">'.$contents.'</script>'; |
|
| 111 | break; |
|
| 112 | case 'style': |
|
| 113 | $output .= '<style class="kint-style">'.$contents.'</style>'; |
|
| 114 | break; |
|
| 115 | default: |
|
| 116 | $output .= $contents; |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||
| 120 | if (!$this->mod_return) { |
|
| 121 | self::$been_run = true; |
|
| 122 | } |
|
| 123 | } |
|
| 124 | ||
| 125 | return $output.'<div class="kint-plain">'; |
|
| 126 | } |
|
| 127 | ||
| 128 | public function postRender() |
|
| 129 | { |
|
| @@ 364-397 (lines=34) @@ | ||
| 361 | } |
|
| 362 | } |
|
| 363 | ||
| 364 | public function preRender() |
|
| 365 | { |
|
| 366 | $output = ''; |
|
| 367 | ||
| 368 | if (!self::$been_run || $this->mod_return) { |
|
| 369 | foreach (self::$pre_render_sources as $type => $values) { |
|
| 370 | $contents = ''; |
|
| 371 | foreach ($values as $v) { |
|
| 372 | $contents .= call_user_func($v, $this); |
|
| 373 | } |
|
| 374 | ||
| 375 | if (!strlen($contents)) { |
|
| 376 | continue; |
|
| 377 | } |
|
| 378 | ||
| 379 | switch ($type) { |
|
| 380 | case 'script': |
|
| 381 | $output .= '<script class="kint-script">'.$contents.'</script>'; |
|
| 382 | break; |
|
| 383 | case 'style': |
|
| 384 | $output .= '<style class="kint-style">'.$contents.'</style>'; |
|
| 385 | break; |
|
| 386 | default: |
|
| 387 | $output .= $contents; |
|
| 388 | } |
|
| 389 | } |
|
| 390 | ||
| 391 | if (!$this->mod_return) { |
|
| 392 | self::$been_run = true; |
|
| 393 | } |
|
| 394 | } |
|
| 395 | ||
| 396 | return $output.'<div class="kint-rich">'; |
|
| 397 | } |
|
| 398 | ||
| 399 | public function postRender() |
|
| 400 | { |
|