Source for file BackgroundAttachmentSC.class.php

Documentation is available at BackgroundAttachmentSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The BackgroundAttachmentSC represents CSS background-attachment values. The allowed values are:
  7. * <ul style="font-family: monospace;">
  8. * <li> scroll </li>
  9. * <li> fixed </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: BackgroundAttachmentSC.class.php,v 1.6 2006/08/15 20:44:58 sporktim Exp $
  22. */
  23. class BackgroundAttachmentSC extends StyleComponent {
  24.  
  25. /**
  26. * The constructor.
  27. * @param string value The value to assign to this SC.
  28. * @access public
  29. ***/
  30. function BackgroundAttachmentSC($value) {
  31. $options = array("scroll", "fixed");
  32. $errDescription = "Could not validate the background-attachment StyleComponent value \"%s\". ";
  33. $errDescription .= "Allowed values are ".implode(", ", $options).".";
  34. $displayName = "Background Attachment";
  35. $description = "Specifies the background-attachment value. Allowed values are: ".implode(", ", $options).".";
  36. $rule = RegexValidatorRule::getRuleByArray($options);
  37. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  38. }
  39. }
  40. ?>

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