Source for file FloatSC.class.php

Documentation is available at FloatSC.class.php

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