Source for file DirectionSC.class.php

Documentation is available at DirectionSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The DirectionSC represents CSS direction values. The allowed values are:
  7. * <ul style="font-family: monospace;">
  8. * <li> ltr </li>
  9. * <li> rtl </li>
  10. * </ul>
  11. * <br /><br />
  12. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  13. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  14. * the value follows a certain format.<br /><br />
  15. *
  16. * @package harmoni.gui.scs
  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: DirectionSC.class.php,v 1.8 2006/08/15 20:44:58 sporktim Exp $
  22. */
  23. class DirectionSC extends StyleComponent {
  24.  
  25. /**
  26. * The constructor.
  27. * @param string value The value to assign to this SC.
  28. * @access public
  29. ***/
  30. function DirectionSC($value) {
  31. $options = array("ltr","rtl");
  32. $errDescription = "Could not validate the direction StyleComponent value \"%s\". ";
  33. $errDescription .= "Allowed values are ".implode(", ", $options).".";
  34. $displayName = "Direction";
  35. $description = "Specifies the text direction (left-to-right or right-to-left).
  36. Allowed values are: ".implode(", ", $options).".";
  37. $rule = RegexValidatorRule::getRuleByArray($options);
  38. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  39. }
  40. }
  41. ?>

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