Response.php 323 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Lychee\Modules;
  3. final class Response {
  4. public static function warning($msg) {
  5. exit(json_encode('Warning: ' . $msg));
  6. }
  7. public static function error($msg) {
  8. exit(json_encode('Error: ' . $msg));
  9. }
  10. public static function json($str, $options = 0) {
  11. exit(json_encode($str, $options));
  12. }
  13. }