'Kint\\Renderer\\Rich\\ArrayLimitPlugin', 'blacklist' => 'Kint\\Renderer\\Rich\\BlacklistPlugin', 'callable' => 'Kint\\Renderer\\Rich\\CallablePlugin', 'closure' => 'Kint\\Renderer\\Rich\\ClosurePlugin', 'color' => 'Kint\\Renderer\\Rich\\ColorPlugin', 'depth_limit' => 'Kint\\Renderer\\Rich\\DepthLimitPlugin', 'recursion' => 'Kint\\Renderer\\Rich\\RecursionPlugin', 'simplexml_element' => 'Kint\\Renderer\\Rich\\SimpleXMLElementPlugin', 'trace_frame' => 'Kint\\Renderer\\Rich\\TraceFramePlugin', ]; /** * RichRenderer tab plugins should implement Kint\Renderer\Rich\TabPluginInterface. */ public static $tab_plugins = [ 'binary' => 'Kint\\Renderer\\Rich\\BinaryPlugin', 'color' => 'Kint\\Renderer\\Rich\\ColorPlugin', 'docstring' => 'Kint\\Renderer\\Rich\\DocstringPlugin', 'microtime' => 'Kint\\Renderer\\Rich\\MicrotimePlugin', 'source' => 'Kint\\Renderer\\Rich\\SourcePlugin', 'table' => 'Kint\\Renderer\\Rich\\TablePlugin', 'timestamp' => 'Kint\\Renderer\\Rich\\TimestampPlugin', ]; public static $pre_render_sources = [ 'script' => [ ['Kint\\Renderer\\RichRenderer', 'renderJs'], ['Kint\\Renderer\\Rich\\MicrotimePlugin', 'renderJs'], ], 'style' => [ ['Kint\\Renderer\\RichRenderer', 'renderCss'], ], 'raw' => [], ]; /** * Whether or not to render access paths. * * Access paths can become incredibly heavy with very deep and wide * structures. Given mostly public variables it will typically make * up one quarter of the output HTML size. * * If this is an unacceptably large amount and your browser is groaning * under the weight of the access paths - your first order of buisiness * should be to get a new browser. Failing that, use this to turn them off. * * @var bool */ public static $access_paths = true; /** * The maximum length of a string before it is truncated. * * Falsey to disable * * @var int */ public static $strlen_max = 80; /** * Path to the CSS file to load by default. * * @var string */ public static $theme = 'original.css'; /** * Assume types and sizes don't need to be escaped. * * Turn this off if you use anything but ascii in your class names, * but it'll cause a slowdown of around 10% * * @var bool */ public static $escape_types = false; /** * Move all dumps to a folder at the bottom of the body. * * @var bool */ public static $folder = false; /** * Sort mode for object properties. * * @var int */ public static $sort = self::SORT_NONE; public static $needs_pre_render = true; public static $needs_folder_render = true; public static $always_pre_render = false; public static $js_nonce = null; public static $css_nonce = null; protected $plugin_objs = []; protected $expand = false; protected $force_pre_render = false; protected $pre_render; protected $use_folder; public function __construct() { $this->pre_render = self::$needs_pre_render; $this->use_folder = self::$folder; if (self::$always_pre_render) { $this->setForcePreRender(); } } public function setCallInfo(array $info) { parent::setCallInfo($info); if (\in_array('!', $this->call_info['modifiers'], true)) { $this->setExpand(true); $this->use_folder = false; } if (\in_array('@', $this->call_info['modifiers'], true)) { $this->setForcePreRender(); } } public function setStatics(array $statics) { parent::setStatics($statics); if (!empty($statics['expanded'])) { $this->setExpand(true); } if (!empty($statics['return'])) { $this->setForcePreRender(); } } public function setExpand($expand) { $this->expand = $expand; } public function getExpand() { return $this->expand; } public function setForcePreRender() { $this->force_pre_render = true; $this->pre_render = true; } public function setPreRender($pre_render) { $this->pre_render = $pre_render; } public function getPreRender() { return $this->pre_render; } public function setUseFolder($use_folder) { $this->use_folder = $use_folder; } public function getUseFolder() { return $this->use_folder; } public function render(Value $o) { if ($plugin = $this->getPlugin(self::$value_plugins, $o->hints)) { $output = $plugin->renderValue($o); if (null !== $output && \strlen($output)) { return $output; } } $children = $this->renderChildren($o); $header = $this->renderHeaderWrapper($o, (bool) \strlen($children), $this->renderHeader($o)); return '