?> <tr> <td><?php echo $sName; ?> </td> <td><?php echo (double) $p1m + (double) $p1s; ?> </td> <td> <?php if ($sPreviousName !== '') { ?> <span><?php echo \Plethora\Benchmark::elapsedTime($sPreviousName, $sName); ?> </span> <?php } else { ?> <span>0</span> <?php } ?> </td> </tr> <?php $sPreviousName = $sName; ?> <?php
/** * Create response for particular Controller. * * @access public * @param View $oContent * @return Response * @since 1.0.0-alpha * @version 1.0.0-alpha */ public function createResponse(View $oContent = NULL) { if (is_null($oContent)) { $oContent = $this->{Router::getActionName()}(); $this->afterAction(); } $sContent = ''; if ($oContent !== NULL) { $this->oView->bind('oContent', $oContent); // developers toolbar - CSS if (Router::hasModule('dev_toolbar') && \UserPermissions::hasPerm('dev_toolbar')) { $this->addJs('/themes/_common/js/dev_toolbar.js'); $this->addCss('/themes/backend/css/dev_toolbar.css'); $this->addBodyClass('dev_toolbar'); } // render page View $sContent = $this->oViewMain->render(); // add last benchmark Benchmark::mark('end'); // developers toolbar if (Router::hasModule('dev_toolbar') && \UserPermissions::hasPerm('dev_toolbar')) { $sToolbar = \DevToolbar\Toolbar::factory()->render(); $sContent = str_replace('</body>', $sToolbar . '</body>', $sContent); } } // create response $oResponse = new Response(); $oResponse->setContent($sContent); // clear temp data after response creation Session::clearTempData(); // return response return $oResponse; }
/** * Render toolbar. * * @access public * @return string * @since 1.0.0-dev, 2015-06-08 * @version 1.1.0-dev */ public function render() { $oSqlLogger = DB::getEntityManager()->getConnection()->getConfiguration()->getSQLLogger(); //* @var $oSqlLogger \Doctrine\DBAL\Logging\DebugStack */ $aRoutesList = Router::getRoutes(); $aModules = Router::getModules(); $aBenchmarkMarks = Benchmark::getAllMarks(); $aCustoms = static::getCustoms(); $cronJobs = CronJobsHelper::getCronJobs(); return View::factory('dev_toolbar/toolbar')->bind('oSqlLogger', $oSqlLogger)->bind('aRoutesList', $aRoutesList)->bind('aModules', $aModules)->bind('aCustoms', $aCustoms)->bind('aBenchmarkMarks', $aBenchmarkMarks)->bind('cronJobs', $cronJobs)->render(); }
// ob_end_clean(); // echo preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $sInfo); ?> </div> </div> <div class="dv-section benchmark <?php if ($sBenchmark !== '') { ?> active<?php } ?> "> <div class="dv-section-header"> <span class="image"></span> <span class="text"><?php echo \Plethora\Benchmark::elapsedTime('start', 'end'); ?> ms<?php echo $sBenchmark; ?> </span> </div> <?php if ($sBenchmark !== '') { ?> <div class="dv-section-content"><?php echo \Plethora\View::factory('dev_toolbar/toolbar/benchmark')->bind('aBenchmarkMarks', $aBenchmarkMarks)->render(); ?> </div> <?php }