Source for file ErrorCheckingWizardComponent.abstract.php

Documentation is available at ErrorCheckingWizardComponent.abstract.php

  1. <?php
  2. /**
  3. * @since Jul 22, 2005
  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: ErrorCheckingWizardComponent.abstract.php,v 1.6 2007/09/19 14:04:50 adamfranco Exp $
  10. */
  11. require_once(POLYPHONY."/main/library/Wizard/WizardComponent.abstract.php");
  12. /**
  13. * Defines a component that makes use of the Wizard's javascript error checking abilities.
  14. *
  15. * @since Jul 22, 2005
  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: ErrorCheckingWizardComponent.abstract.php,v 1.6 2007/09/19 14:04:50 adamfranco Exp $
  22. * @abstract
  23. */
  24. abstract class ErrorCheckingWizardComponent
  25. extends WizardComponent
  26. {
  27. var $_errorRule = null;
  28. var $_errorMessage = null;
  29. var $_errorStyle = "color: red;";
  30. /**
  31. * Sets this element's regular expression. Its value must match this to be considered valid.
  32. * @param string $regex
  33. * @access public
  34. * @return void
  35. */
  36. function setErrorRule ($rule) {
  37. $this->_errorRule =$rule;
  38. }
  39. /**
  40. * Sets the text to be displayed if an error occurs.
  41. * @param string $text
  42. * @access public
  43. * @return void
  44. */
  45. function setErrorText ($text) {
  46. $this->_errorMessage = $text;
  47. }
  48. /**
  49. * Sets the CSS style of the error text.
  50. * @param string $style
  51. * @access public
  52. * @return void
  53. */
  54. function setErrorStyle ($style) {
  55. $this->_errorStyle = $style;
  56. }
  57. /**
  58. * Returns the error {@link WECRule}.
  59. * @access public
  60. * @return ref object
  61. */
  62. function getErrorRule () {
  63. return $this->_errorRule;
  64. }
  65. /**
  66. * Returns the error text.
  67. * @access public
  68. * @return string
  69. */
  70. function getErrorText () {
  71. return $this->_errorMessage;
  72. }
  73. /**
  74. * Returns the error text CSS style.
  75. * @access public
  76. * @return string
  77. */
  78. function getErrorStyle () {
  79. return $this->_errorStyle;
  80. }
  81. }
  82.  
  83.  
  84. ?>

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