NodeInterface.php 570B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Knp\Menu;
  3. /**
  4. * Interface implemented by a node to construct a menu from a tree.
  5. */
  6. interface NodeInterface
  7. {
  8. /**
  9. * Get the name of the node
  10. *
  11. * Each child of a node must have a unique name
  12. *
  13. * @return string
  14. */
  15. function getName();
  16. /**
  17. * Get the options for the factory to create the item for this node
  18. *
  19. * @return array
  20. */
  21. function getOptions();
  22. /**
  23. * Get the child nodes implementing NodeInterface
  24. *
  25. * @return \Traversable
  26. */
  27. function getChildren();
  28. }