public function endRoot() { $this->out .= "\n"; if (($timeout = ref::getTimeoutPoint()) > 0) { $this->out .= sprintf("\n[3;91m-- Listing incomplete. Timed-out after %4.2fs --[0m\n", $timeout); } }
public function endRoot() { $this->out .= "</{$this->def['base']}>"; // process tooltips $tipHtml = ''; foreach ($this->tips as $idx => $meta) { $tip = ''; if (!is_array($meta)) { $meta = array('title' => $meta); } $meta += array('title' => '', 'left' => '', 'description' => '', 'tags' => array(), 'sub' => array()); $meta = static::escape($meta); $cols = array(); if ($meta['left']) { $cols[] = "<{$this->def['base']} {$this->def['cell']} data-varType>{$meta['left']}</{$this->def['base']}>"; } $title = $meta['title'] ? "<{$this->def['base']} data-title>{$meta['title']}</{$this->def['base']}>" : ''; $desc = $meta['description'] ? "<{$this->def['base']} data-desc>{$meta['description']}</{$this->def['base']}>" : ''; $tags = ''; foreach ($meta['tags'] as $tag => $values) { foreach ($values as $value) { if ($tag === 'param') { $value[0] = "{$value[0]} {$value[1]}"; unset($value[1]); } $value = is_array($value) ? implode("</{$this->def['base']}><{$this->def['base']} {$this->def['cell']}>", $value) : $value; $tags .= "<{$this->def['base']} {$this->def['row']}><{$this->def['base']} {$this->def['cell']}>@{$tag}</{$this->def['base']}><{$this->def['base']} {$this->def['cell']}>{$value}</{$this->def['base']}></{$this->def['base']}>"; } } if ($tags) { $tags = "<{$this->def['base']} {$this->def['table']}>{$tags}</{$this->def['base']}>"; } if ($title || $desc || $tags) { $cols[] = "<{$this->def['base']} {$this->def['cell']}>{$title}{$desc}{$tags}</{$this->def['base']}>"; } if ($cols) { $tip = "<{$this->def['base']} {$this->def['row']}>" . implode('', $cols) . "</{$this->def['base']}>"; } $sub = ''; foreach ($meta['sub'] as $line) { $sub .= "<{$this->def['base']} {$this->def['row']}><{$this->def['base']} {$this->def['cell']}>" . implode("</{$this->def['base']}><{$this->def['base']} {$this->def['cell']}>", $line) . "</{$this->def['base']}></{$this->def['base']}>"; } if ($sub) { $tip .= "<{$this->def['base']} {$this->def['row']}><{$this->def['base']} {$this->def['cell']} data-sub><{$this->def['base']} {$this->def['table']}>{$sub}</{$this->def['base']}></{$this->def['base']}></{$this->def['base']}>"; } if ($tip) { $this->out .= "<{$this->def['tip']}>{$tip}</{$this->def['tip']}>"; } } if (($timeout = ref::getTimeoutPoint()) > 0) { $this->out .= sprintf("<{$this->def['base']} data-error>Listing incomplete. Timed-out after %4.2fs</{$this->def['base']}>", $timeout); } $this->out .= '</div></div><!-- /ref#' . static::$counter . ' -->'; }