Source for file BorderStyleSC.class.php

Documentation is available at BorderStyleSC.class.php

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

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