1
0
Fork 0
mirror of https://github.com/Oreolek/debug-toolbar.git synced 2024-04-25 21:59:17 +03:00

Improve custom's sections rendering

This commit is contained in:
biakaveron 2013-10-15 01:04:39 +04:00
parent faa657a088
commit 3f6a4c854e

View file

@ -213,9 +213,14 @@ abstract class Kohana_Debugtoolbar {
foreach(self::$_custom_sections as $section)
{
list($title, $data, $logo) = $section;
if ( ! is_string($data) && is_callable($data))
{
$data = call_user_func($data);
}
$result[] = array(
'title' => is_callable($title) ? call_user_func($title) : (string)$title,
'content' => is_callable($data) ? call_user_func($data) : $data,
'title' => ! is_string($title) && is_callable($title) ? call_user_func($title) : (string)$title,
'content' => is_string($data) ? $data : Debug::dump($data),
'logo' => $logo
);
}