exit();
}
+ public static function jsonError($httpCode, $data, $content_type = 'application/json')
+ {
+ header($_SERVER["SERVER_PROTOCOL"] . ' ' . $httpCode);
+ self::jsonExit($data, $content_type);
+ }
+
/**
* @brief Encodes content to json.
*
}
}
- /**
- * Generates a process identifier for the logging
- *
- * @param string $prefix A given prefix
- *
- * @return string a generated process identifier
- */
- public static function processID($prefix)
- {
- // We aren't calling any other function here.
- // Doing so could easily create an endless loop
- $trailer = $prefix . ':' . getmypid() . ':';
- return substr($trailer . uniqid('') . mt_rand(), 0, 26);
- }
-
/**
* Returns the current Load of the System
*