Source for file FontStyleSC.class.php

Documentation is available at FontStyleSC.class.php

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

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