Source for file StepWizard.abstract.php

Documentation is available at StepWizard.abstract.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: StepWizard.abstract.php,v 1.5 2007/09/19 14:04:50 adamfranco Exp $
  10. */
  11.  
  12. require_once(POLYPHONY."/main/library/Wizard/SimpleWizard.class.php");
  13. require_once(POLYPHONY."/main/library/Wizard/Components/WizardStepContainer.class.php");
  14. require_once(POLYPHONY."/main/library/Wizard/Components/WCancelButton.class.php");
  15. require_once(POLYPHONY."/main/library/Wizard/Components/WStepDisplayBar.class.php");
  16.  
  17.  
  18. /**
  19. * Abstract parent for wizards that contain multiple steps
  20. *
  21. * @since 5/31/06
  22. * @package polyphony.wizard
  23. *
  24. * @copyright Copyright &copy; 2005, Middlebury College
  25. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  26. *
  27. * @version $Id: StepWizard.abstract.php,v 1.5 2007/09/19 14:04:50 adamfranco Exp $
  28. */
  29. class StepWizard extends SimpleWizard {
  30. var $_stepContainer;
  31. var $_cancelButton;
  32.  
  33. /**
  34. * Answers the step container
  35. *
  36. * @return array the steps for this wizard
  37. * @access public
  38. * @since 5/5/06
  39. */
  40. function getSteps () {
  41. return $this->_stepContainer->getSteps();
  42. }
  43.  
  44. /**
  45. * Adds a new {@link WizardStep} to this wizard.
  46. * @param string $name A short id/name for this step.
  47. * @param ref object $step
  48. * @access public
  49. * @return ref object
  50. */
  51. function addStep ($name, $step) {
  52. return $this->_stepContainer->addStep($name, $step);
  53. }
  54. /**
  55. * Sets the step to the named step.
  56. * @param string $name
  57. * @access public
  58. * @return void
  59. */
  60. function setStep ($name) {
  61. $this->_stepContainer->setStep($name);
  62. }
  63. // @todo passing the class of the step wizard to the parent classes!!
  64. /**
  65. * Answer the name of the current step
  66. *
  67. * @return string
  68. * @access public
  69. * @since 6/5/07
  70. */
  71. function getCurrentStepName () {
  72. return $this->_stepContainer->getCurrentStepName();
  73. }
  74. /**
  75. * Returns the values of wizard-components. Should return an array if children are involved,
  76. * otherwise a whatever type of object is expected.
  77. * @access public
  78. * @return mixed
  79. */
  80. function getAllValues () {
  81. $values = parent::getAllValues();
  82. return $values['_steps'];
  83. }
  84.  
  85. }
  86.  
  87. ?>

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