Source for file StyleBlockViolationDetail.inc

Documentation is available at StyleBlockViolationDetail.inc

  1. <?php
  2. ################################################################
  3. # This file is part of SlidingDoors #
  4. # Copyright 2001-2003. Eric D. Nielsen, All rights reserverd #
  5. # SlidingDoors is availible for license under the GPL, see #
  6. # the COPYING file in the root directory of the install for #
  7. # the full terms of the GPL. #
  8. # #
  9. # File: NumEventBlocksViolationDetail.inc #
  10. # Author: Eric D. Nielsen #
  11. # Description: A class that hold data describing when a #
  12. # user tries to compete in too many levels in a #
  13. # style #
  14. # Attributes: details -- textual description of the reason of #
  15. # a false #
  16. # Constructor: StyleBlockViolationDetail #
  17. # Methods: getText #
  18. # Change Log: 1/07/03 -- created -- edn #
  19. ################################################################
  20.  
  21. class StyleBlockViolationDetail extends ContraCheckDetail
  22. {
  23. var $personID;
  24. var $personName;
  25. var $styles;
  26. ############################################################
  27. # Function: StyleBlockViolationDetail #
  28. # Arguments: db -- the db to interact with #
  29. # personID -- the person generating the error #
  30. # eventName -- the events generating the error #
  31. # style -- which style caused the error #
  32. # Returns: nothing #
  33. # Modifies: this #
  34. # Requires: nothing #
  35. ############################################################
  36. function StyleBlockViolationDetail($db,$personID,
  37. $style)
  38. {
  39. ContraCheckDetail::ContraCheckDetail($db);
  40. $this->personID = $personID;
  41. $person = new Person($db);
  42. $person->setID($personID);
  43. $person->retrieve();
  44. $this->personName = $person->getFirstName() . " " .
  45. $person->getLastName();
  46. $this->styles=array();
  47. $this->styles[]=$style;
  48. }
  49.  
  50. ############################################################
  51. # Function: addViolation #
  52. # Arguments: style -- an additional style breaking the rule#
  53. # Returns: nothing #
  54. # Modifies: this #
  55. # Requires: nothing #
  56. ############################################################
  57. function addViolation($style)
  58. {
  59. $this->styles[]=$style;
  60. }
  61. ############################################################
  62. # Function: getText #
  63. # Arguments: none #
  64. # Returns: nothing #
  65. # Modifies: this #
  66. # Requires: nothing #
  67. ############################################################
  68. function getText()
  69. {
  70. $returnString = "<br><font color=\"red\">Currently $this->personName is ";
  71. $returnString .= "attempting to dance too many levels in some styles. Please review your desired registration and the packages both you and your partner have selected.";
  72. $returnString .= ".</font>";
  73. return $returnString;
  74. }
  75. }
  76. ?>

Documentation generated on Tue, 25 Apr 2006 13:11:12 -0400 by phpDocumentor 1.3.0RC3