PageRenderTime 48ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/mvc/lib/Dbg.class.php

https://github.com/KnightOfNight/simpleMVC
PHP | 47 lines | 16 code | 10 blank | 21 comment | 0 complexity | e20cb9697e1d9362cc3916c12ff225c8 MD5 | raw file
  1. <?php
  2. /**
  3. * @author >X @ MCS 'Net Productions
  4. * @package simpleMVC
  5. * @version 0.5.0
  6. */
  7. /**
  8. * Singleton class that provides acess to debugging tools.
  9. *
  10. * @package simpleMVC
  11. */
  12. class Dbg {
  13. private function __construct () {}
  14. /**
  15. * Dump the contents and structure of a variable to the screen.
  16. *
  17. * @param string variable name
  18. * @param mixed variable contents
  19. */
  20. static function var_dump ($var_name, $var_contents) {
  21. printf ("<pre>\n");
  22. printf ("%s => ", $var_name);
  23. var_dump ($var_contents);
  24. printf ("</pre>\n");
  25. }
  26. /**
  27. * Print a message to the screen.
  28. *
  29. * @param string message
  30. */
  31. static function msg ($message) {
  32. printf ("<pre>\n");
  33. printf ("%s\n", $message);
  34. printf ("</pre>\n");
  35. }
  36. function __destruct () {}
  37. }