Source for file WLogicRule.class.php

Documentation is available at WLogicRule.class.php

  1. <?php
  2. /**
  3. * @since 5/31/06
  4. * @package polyphony.wizard
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: WLogicRule.class.php,v 1.8 2007/09/19 14:04:51 adamfranco Exp $
  10. */
  11.  
  12. /**
  13. * Logic Class allows for wizards to be freeform and direct their own progress
  14. *
  15. * @since 5/31/06
  16. * @package polyphony.wizard
  17. *
  18. * @copyright Copyright &copy; 2005, Middlebury College
  19. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  20. *
  21. * @version $Id: WLogicRule.class.php,v 1.8 2007/09/19 14:04:51 adamfranco Exp $
  22. */
  23. class WLogicRule {
  24. var $_requiredSteps;
  25. /**
  26. * Default constructor, added for testing
  27. **/
  28.  
  29. function WLogicRule() {
  30. }
  31. /**
  32. * virtual constructor
  33. *
  34. * @param array $steps an array of steps required by this logic
  35. * @return VOID
  36. * @access public
  37. * @since 5/31/06
  38. */
  39. function withSteps ($steps) {
  40. $rule = new WLogicRule();
  41. $rule->setRequiredSteps($steps);
  42. return $rule;
  43. }
  44. /**
  45. * returns an array of the steps required by this rule being fired
  46. *
  47. * @return array of names of steps that are now required
  48. * @access public
  49. * @since 5/31/06
  50. */
  51. function getRequiredSteps () {
  52. return $this->_requiredSteps;
  53. }
  54.  
  55. /**
  56. * returns an array of the steps required by this rule being fired
  57. *
  58. * @param array of names of steps that are now required
  59. * @access public
  60. * @since 5/31/06
  61. */
  62. function setRequiredSteps ($steps) {
  63. $this->_requiredSteps = $steps;
  64. }
  65. /**
  66. * adds a required step
  67. *
  68. * @param string $stepName
  69. * @return void
  70. * @access public
  71. * @since 5/31/06
  72. */
  73. function addRequiredStepToRule ($stepName) {
  74. $this->_requiredSteps[] = $stepName;
  75. }
  76. }
  77.  
  78. ?>

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