Node.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Gedmo\Tree;
  3. /**
  4. * This interface is not necessary but can be implemented for
  5. * Entities which in some cases needs to be identified as
  6. * Tree Node
  7. *
  8. * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
  9. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  10. */
  11. interface Node
  12. {
  13. // use now annotations instead of predifined methods, this interface is not necessary
  14. /**
  15. * @gedmo:TreeLeft
  16. * to mark the field as "tree left" use property annotation @gedmo:TreeLeft
  17. * it will use this field to store tree left value
  18. */
  19. /**
  20. * @gedmo:TreeRight
  21. * to mark the field as "tree right" use property annotation @gedmo:TreeRight
  22. * it will use this field to store tree right value
  23. */
  24. /**
  25. * @gedmo:TreeParent
  26. * in every tree there should be link to parent. To identify a relation
  27. * as parent relation to child use @Tree:Ancestor annotation on the related property
  28. */
  29. /**
  30. * @gedmo:TreeLevel
  31. * level of node.
  32. */
  33. }