public static function disable()
 {
     self::$_enabled = false;
 }
Exemple #2
0
 /**
  * Disabling profiler
  *
  * @return void
  */
 public static function disable()
 {
     if (self::isEnabled()) {
         // stop any timers still on stack (those might be stopped after calculation otherwise)
         $stackCopy = self::$stack;
         while ($timerName = array_pop($stackCopy)) {
             self::stop($timerName);
         }
     }
     self::$_enabled = false;
     self::calculate();
 }