Source for file ClearSC.class.php

Documentation is available at ClearSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The ClearSC represents CSS clear values. The allowed values are:
  7. * <ul style="font-family: monospace;">
  8. * <li> none </li>
  9. * <li> left </li>
  10. * <li> right </li>
  11. * <li> both </li>
  12. * </ul>
  13. * <br /><br />
  14. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  15. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  16. * the value follows a certain format.<br /><br />
  17. *
  18. * @package harmoni.gui.scs
  19. *
  20. * @copyright Copyright &copy; 2005, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: ClearSC.class.php,v 1.8 2006/08/15 20:44:58 sporktim Exp $
  24. */
  25. class ClearSC extends StyleComponent {
  26.  
  27. /**
  28. * The constructor.
  29. * @param string value The value to assign to this SC.
  30. * @access public
  31. ***/
  32. function ClearSC($value) {
  33. $options = array("none", "left", "right", "both");
  34. $errDescription = "Could not validate the clear StyleComponent value \"%s\". ";
  35. $errDescription .= "Allowed values are ".implode(", ", $options).".";
  36. $displayName = "Clear";
  37. $description = "Specifies the clear value. Allowed values are: ".implode(", ", $options).".";
  38. $rule = RegexValidatorRule::getRuleByArray($options);
  39. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  40. }
  41. }
  42. ?>

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