Node.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. * @package Gedmo.Tree
  10. * @subpackage Node
  11. * @link http://www.gediminasm.org
  12. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  13. */
  14. interface Node
  15. {
  16. // use now annotations instead of predifined methods, this interface is not necessary
  17. /**
  18. * @gedmo:TreeLeft
  19. * to mark the field as "tree left" use property annotation @gedmo:TreeLeft
  20. * it will use this field to store tree left value
  21. */
  22. /**
  23. * @gedmo:TreeRight
  24. * to mark the field as "tree right" use property annotation @gedmo:TreeRight
  25. * it will use this field to store tree right value
  26. */
  27. /**
  28. * @gedmo:TreeParent
  29. * in every tree there should be link to parent. To identify a relation
  30. * as parent relation to child use @Tree:Ancestor annotation on the related property
  31. */
  32. /**
  33. * @gedmo:TreeLevel
  34. * level of node.
  35. */
  36. }