Beispiel #1
0
function enviar_data()
{
    $vista = capturar_evento();
    if ($vista) {
        $modelo = identificar_modelo($vista);
        if ($modelo) {
            $data = invocar_modelo($modelo);
            if ($data) {
                require_once 'view.php';
                render_data($vista, $data);
            }
        }
    }
}
Beispiel #2
0
 /**
  * @param ProfilerEvent[] $events
  */
 function _render_events($events, $level, $types_color)
 {
     if (empty($events)) {
         return;
     }
     echo $level == 0 ? '<table class="data data-events">' : '<table>';
     foreach ($events as $event) {
         $info = $event->name;
         if ($event->data) {
             $info .= ' <span class="event-data" title="Event data">(' . render_data($event->data) . ')</span>';
         }
         if ($event->duration) {
             $info .= ' <span class="event-duration" title="Event duration">(' . EurekaProfiler_Tools::readable_interval($event->duration) . ')</span>';
         }
         if ($event->backtrace) {
             $info .= '<p class="event-backtrace" title="Event backtrace">' . $event->backtrace . '</p>';
         }
         $children = '';
         if (!empty($event->children)) {
             ob_start();
             _render_events($event->children, $level + 1, $types_color);
             $children = ob_get_clean();
         }
         $timemark = '<span class="more" title="Event time">' . EurekaProfiler_Tools::readable_interval($event->timemark) . '</span>';
         basic_row($event->type, $timemark . $info . $children, null, $types_color[$event->type]);
     }
     echo '</table>';
 }