/** * Sends debugging information to client * @param string $txt Debug value. Set to TRUE or FALSE to enable or disable debugging * @return boolean */ public static function debug($txt) { if ($txt === true || $txt === false) { self::$isDebug = self::$config['debug'] = $txt; return true; } if (self::$isDebug) { if (!isset(self::$debug)) { self::$debug = array(); } self::$debug[] = print_r($txt, true); return true; } return false; }