菜谱项目

NodeInterface.php 934B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\CssSelector\Node;
  11. /**
  12. * Interface for nodes.
  13. *
  14. * This component is a port of the Python cssselect library,
  15. * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
  16. *
  17. * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
  18. *
  19. * @internal
  20. */
  21. interface NodeInterface
  22. {
  23. /**
  24. * Returns node's name.
  25. *
  26. * @return string
  27. */
  28. public function getNodeName();
  29. /**
  30. * Returns node's specificity.
  31. *
  32. * @return Specificity
  33. */
  34. public function getSpecificity();
  35. /**
  36. * Returns node's string representation.
  37. *
  38. * @return string
  39. */
  40. public function __toString();
  41. }