[ ['Kint\\Renderer\\PlainRenderer', 'renderJs'], ['Kint\\Renderer\\Text\\MicrotimePlugin', 'renderJs'], ], 'style' => [ ['Kint\\Renderer\\PlainRenderer', 'renderCss'], ], 'raw' => [], ]; /** * Path to the CSS file to load by default. * * @var string */ public static $theme = 'plain.css'; /** * Output htmlentities instead of utf8. * * @var bool */ public static $disable_utf8 = false; public static $needs_pre_render = true; public static $always_pre_render = false; protected $force_pre_render = false; protected $pre_render; public function __construct() { parent::__construct(); $this->pre_render = self::$needs_pre_render; if (self::$always_pre_render) { $this->setPreRender(true); } } public function setCallInfo(array $info) { parent::setCallInfo($info); if (\in_array('@', $this->call_info['modifiers'], true)) { $this->setPreRender(true); } } public function setStatics(array $statics) { parent::setStatics($statics); if (!empty($statics['return'])) { $this->setPreRender(true); } } public function setPreRender($pre_render) { $this->pre_render = $pre_render; $this->force_pre_render = true; } public function getPreRender() { return $this->pre_render; } public function colorValue($string) { return ''.$string.''; } public function colorType($string) { return ''.$string.''; } public function colorTitle($string) { return ''.$string.''; } public function renderTitle(Value $o) { if (self::$disable_utf8) { return $this->utf8ToHtmlentity(parent::renderTitle($o)); } return parent::renderTitle($o); } public function preRender() { $output = ''; if ($this->pre_render) { foreach (self::$pre_render_sources as $type => $values) { $contents = ''; foreach ($values as $v) { $contents .= \call_user_func($v, $this); } if (!\strlen($contents)) { continue; } switch ($type) { case 'script': $output .= ''; break; case 'style': $output .= ''; break; default: $output .= $contents; } } // Don't pre-render on every dump if (!$this->force_pre_render) { self::$needs_pre_render = false; } } return $output.'