Beispiel #1
0
 /**
  * xapp debug shortcut function used system wide in xapp framework and can be overwritten. if xapp base class is used
  * will redirect debug messages back to xapp::d debug function unless xapp conf constant XAPP_CONF_DEBUG_MODE is set
  * to 4 or "console" redirecting all debug messages directly to php browser console via the Xapp_Console wrapper class.
  *
  * overwrite like:
  * <code>
  *      function xapp_debug($m, $l = null, Array $p = array())
  *      {
  *          //your custom code here
  *      }
  * </code>
  *
  * @param mixed $m expects the debug message as string or any other value
  * @param null|string $l expects optional label
  * @param array $p expects optional parameter array (currently unused)
  * @return void
  */
 function xapp_debug($m, $l = null, array $p = array())
 {
     if (xapped()) {
         if (xapped('Xapp_Console') && (bool) xapp_conf(XAPP_CONF_CONSOLE) && ((int) xapp_conf(XAPP_CONF_DEBUG_MODE) === 4 || strtolower((string) xapp_conf(XAPP_CONF_DEBUG_MODE)) === 'console')) {
             xapp_console($m, null, 'info', $p);
         } else {
             Xapp::d($m, $p);
         }
     }
 }