Source for file FontVariantSC.class.php

Documentation is available at FontVariantSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The FontVariantSC represents CSS "font-variant" values. The allowed
  7. * values are:
  8. * <ul style="font-family: monospace;">
  9. * <li> normal </li>
  10. * <li> small-caps </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: FontVariantSC.class.php,v 1.8 2006/08/15 20:44:58 sporktim Exp $
  23. */
  24. class FontVariantSC extends StyleComponent {
  25.  
  26. /**
  27. * The constructor.
  28. * @param string value The value to assign to this SC.
  29. * @access public
  30. ***/
  31. function FontVariantSC($value=null) {
  32. $options = array("normal","small-caps");
  33.  
  34. $errDescription = "Could not validate the font-variant StyleComponent value \"%s\".
  35. Allowed values are: ".implode(", ", $options).".";
  36. $displayName = "Font Variant";
  37. $description = "Specifies the font variant. This property allows one to
  38. create text composed of capital letters. Allowed values
  39. are: ".implode(", ", $options).".";
  40. $rule = RegexValidatorRule::getRuleByArray($options);
  41. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  42. }
  43. }
  44. ?>

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