Source for file WECNonZeroRegex.class.php

Documentation is available at WECNonZeroRegex.class.php

  1. <?php
  2. /**
  3. * @since Jul 23, 2005
  4. * @package polyphony.wizard.errorchecking
  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: WECNonZeroRegex.class.php,v 1.3 2007/09/19 14:04:52 adamfranco Exp $
  10. */
  11. require_once(POLYPHONY."/main/library/Wizard/ErrorCheckingRules/WECRegex.class.php");
  12. /**
  13. * Allows for regular expression javascript error checking.
  14. *
  15. * @since Jul 23, 2005
  16. * @package polyphony.wizard.errorchecking
  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: WECNonZeroRegex.class.php,v 1.3 2007/09/19 14:04:52 adamfranco Exp $
  22. */
  23. class WECNonZeroRegex
  24. extends WECRegex
  25. {
  26. /**
  27. * Returns true if the passed {@link WizardComponent} validates against this rule.
  28. * @param ref object $component
  29. * @access public
  30. * @return boolean
  31. */
  32. function checkValue ($component) {
  33. $value = $component->getAllValues();
  34. if (!strval($value)) return false;
  35. return parent::checkValue($component);
  36. }
  37. }
  38.  
  39.  
  40. ?>

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