Source for file UrlSC.class.php

Documentation is available at UrlSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The UrlSC represents CSS "url" values. The URL format is:
  7. * <ul style="font-family: monospace;">
  8. * <li> url(URL) - where URL is an absolute or relative link (optionally quoted
  9. * with single or double quotes).</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: UrlSC.class.php,v 1.9 2007/09/04 20:25:23 adamfranco Exp $
  22. */
  23. class UrlSC extends StyleComponent {
  24.  
  25. /**
  26. * The constructor.
  27. * @param string value The value to assign to this SC.
  28. * @access public
  29. ***/
  30. function UrlSC($value) {
  31. $errDescription = "Could not validate the url StyleComponent value \"%s\".
  32. Allowed values are: url(URL), where URL is an absolute or relative link
  33. (optionally quoted with single or double quotes).";
  34. $rule = RegexValidatorRule::getRule("^url\(.+\)$");
  35.  
  36. $displayName = "URL";
  37. $description = "Specifies a url linking to a resource (an image, an audio file, etc).
  38. Allowed values are: url(URL), where URL is an absolute or relative link
  39. (optionally quoted with single or double quotes).";
  40. $this->StyleComponent($value, $rule, null, null, $errDescription, $displayName, $description);
  41. }
  42. }
  43.  
  44. ?>

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