Beispiel #1
0
 public function buildContent()
 {
     $navigation = AdminPageNavigation::inst();
     $RQ = GetArrayAdapter::inst();
     $AL = PsProfiler::controller();
     $PARAMS['enabled'] = ConfigIni::isProfilingEnabled();
     $mode = null;
     if ($RQ->has('profiler')) {
         $mode = self::MODE_PROFILER;
         $profiler = $RQ->str('profiler');
         $PARAMS['profilers'] = $AL->getStats($profiler);
         $navigation->addPath(self::url(), 'Профайлеры');
         $navigation->setCurrent($profiler);
     }
     if (!$mode) {
         $mode = self::MODE_LIST;
         $PARAMS['profilers'] = $AL->getStats();
         $navigation->setCurrent('Профайлеры');
     }
     $PARAMS['mode'] = $mode;
     echo $this->getFoldedEntity()->fetchTpl($PARAMS);
 }
Beispiel #2
0
 public function resetAll()
 {
     check_condition(!ConfigIni::isProfilingEnabled(), 'Cannot clear profilers when profiling is on.');
     $this->dirManager->clearDir();
 }
Beispiel #3
0
 /** @return PsDefineVar */
 public static final function PROFILING_ENABLED()
 {
     return self::inst(PsDefines::TYPE_G, PsConst::PHP_TYPE_BOOLEAN, ConfigIni::isProfilingEnabled());
 }