Source for file PositionSC.class.php

Documentation is available at PositionSC.class.php

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

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