Beispiel #1
0
 /**
  * Prints a warning to the debug console.
  *
  * @static
  * @internal
  * @param String $text The warning message.
  */
 public static function warning($text)
 {
     if (!self::$_optWarnings) {
         Opl_Debug_Console::addTable('opt_warnings', 'OPT: Warnings', array('Message'));
     }
     Opl_Debug_Console::addTableItem('opt_warnings', array($text));
 }
Beispiel #2
0
 /**
  * The destructor. Clears the output buffers and optionally
  * displays the debug console.
  */
 public function __destruct()
 {
     while (ob_get_level() > 0) {
         ob_end_flush();
     }
     if ($this->debugConsole) {
         try {
             Opt_Support::updateTimers();
             Opl_Debug_Console::display();
         } catch (Opl_Exception $e) {
             die('<div style="background: #f77777;">Opt_Class destructor exception: ' . $e->getMessage() . '</div>');
         }
     }
 }