Source for file DebugItem.class.php

Documentation is available at DebugItem.class.php

  1. <?php
  2.  
  3. //require_once(HARMONI."debugHandler/DebugItem.interface.php");
  4.  
  5. /**
  6. * the DebugItem class holds debug text, a detail level and a category.
  7. *
  8. * @package harmoni.utilities.debugging
  9. *
  10. * @copyright Copyright &copy; 2005, Middlebury College
  11. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  12. *
  13. * @version $Id: DebugItem.class.php,v 1.3 2005/01/19 21:09:59 adamfranco Exp $
  14. ***/
  15.  
  16. class DebugItem {
  17. /**
  18. * @var int $_level The debug detail level.
  19. * @access private
  20. ***/
  21. var $_level;
  22. /**
  23. * @var int $_category The debug category.
  24. * @access private
  25. ***/
  26. var $_category;
  27.  
  28. /**
  29. * @var int $_text The debug text.
  30. * @access private
  31. ***/
  32. var $_text;
  33. /**
  34. * @access private
  35. * @var array $_backtrace
  36. ***/
  37. var $_backtrace;
  38. /**
  39. * The constructor.
  40. *
  41. * @access public
  42. * @return void
  43. ***/
  44. function DebugItem( $text, $level=5, $category="general" ) {
  45. $this->_text = $text;
  46. $this->_category = $category;
  47. $this->_level = $level;
  48. }
  49. /**
  50. * Returns the level (0-9) of the debug text.
  51. *
  52. * @access public
  53. * @return int The debug level.
  54. ***/
  55. function getLevel() {
  56. return $this->_level;
  57. }
  58. /**
  59. * Returns the category of the debug text.
  60. *
  61. * @access public
  62. * @return string The category.
  63. ***/
  64. function getCategory() {
  65. return $this->_category;
  66. }
  67. /**
  68. * Returns the DebugItem's text.
  69. *
  70. * @access public
  71. * @return string The text.
  72. ***/
  73. function getText() {
  74. return $this->_text;
  75. }
  76. /**
  77. * Sets this Item's debug backtrace array.
  78. * @param array $backtrace
  79. * @access public
  80. * @return void
  81. ***/
  82. function setBacktrace($backtrace) {
  83. $this->_backtrace = $backtrace;
  84. }
  85. /**
  86. * Returns the backtrace array.
  87. * @access public
  88. * @return array
  89. ***/
  90. function getBacktrace() {
  91. return $this->_backtrace;
  92. }
  93. }
  94.  
  95. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:40 -0400 by phpDocumentor 1.3.0RC3