Source for file StyleSelector.class.php

Documentation is available at StyleSelector.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleSelector.interface.php");
  4.  
  5. /**
  6. * This is a generic <code>StyleSelector</code> implementation allowing one to
  7. * create an arbitrary selector. The syntax is not validated and thus
  8. * <code>canBeApplied()</code> returns <code>false</code>.
  9. * <br><br>
  10. * A <code>StyleSelector</code> is an object that enables the user to create and
  11. * possibly parse CSS selectors.
  12. *
  13. * For more information on CSS selectors, visit the following webpages:<br>
  14. * <a href = "http://www.blooberry.com/indexdot/css/index10.htm">Index DOT Css</a><br>
  15. * <a href = "http://www.w3.org/TR/CSS21/selector.html">CSS 2.1 Specification, Chapter 5: Selectors</a><br>
  16. * <br><br> A <code>StyleSelector</code> is a mandatory component of <code>StyleCollections</code>.
  17. * For (an extreme) example, consider the style collection represented by the CSS code:
  18. * <pre>
  19. * div.col1 > *#temp + td.hi#bye {
  20. * margin: 20px;
  21. * border: 1px solid #000;
  22. * }
  23. * </pre>
  24. * The string '<code>div.col1 > *#temp + td.hi#bye</code>' is the CSS selector.
  25. *
  26. * @package harmoni.gui.extensions
  27. *
  28. * @copyright Copyright &copy; 2005, Middlebury College
  29. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  30. *
  31. * @version $Id: StyleSelector.class.php,v 1.5 2005/02/07 21:38:17 adamfranco Exp $
  32. */
  33. class StyleSelector extends StyleSelectorInterface {
  34.  
  35. /**
  36. * This is the value of this <code>StyleSelector</code>.
  37. * @var string _value
  38. * @access private
  39. */
  40. var $_value;
  41. /**
  42. * The constructor.
  43. * @access public
  44. * @param string value The value of the selector.
  45. ***/
  46. function StyleSelector($value) {
  47. $this->_value = $value;
  48. }
  49. /**
  50. * Returns the CSS code corresponding to this <code>StyleSelector</code>.
  51. * @access public
  52. * @return string The CSS code corresponding to this <code>StyleSelector</code>.
  53. ***/
  54. function getCSS() {
  55. return $this->_value;
  56. }
  57. /**
  58. * Determines whether the implementation of this <code>StyleSelector</code>
  59. * allows <code>StyleCollections</code> to be applied to <code>Components</code>.
  60. * @access public
  61. * @return
  62. ***/
  63. function canBeApplied() {
  64. return false;
  65. }
  66.  
  67. }
  68.  
  69. ?>

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