Strategy.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace Gedmo\Tree;
  3. interface Strategy
  4. {
  5. /**
  6. * NestedSet strategy
  7. */
  8. const NESTED = 'nested';
  9. /**
  10. * Get the name of strategy
  11. *
  12. * @return string
  13. */
  14. function getName();
  15. /**
  16. * Initialize strategy with tree listener
  17. *
  18. * @param AbstractTreeListener $listener
  19. * @return void
  20. */
  21. function __construct(AbstractTreeListener $listener);
  22. /**
  23. * Operations on tree node updates
  24. *
  25. * @param object $om - object manager
  26. * @param object $object - node
  27. * @return void
  28. */
  29. function processScheduledUpdate($om, $object);
  30. /**
  31. * Operations on tree node deletions
  32. *
  33. * @param object $om - object manager
  34. * @param object $object - node
  35. * @return void
  36. */
  37. function processScheduledDelete($om, $object);
  38. /**
  39. * Operations on tree node persist
  40. *
  41. * @param object $om - object manager
  42. * @param object $object - node
  43. * @return void
  44. */
  45. function processPrePersist($om, $object);
  46. /**
  47. * Operations on tree node insertions
  48. *
  49. * @param object $om - object manager
  50. * @param object $object - node
  51. * @return void
  52. */
  53. function processPostPersist($om, $object);
  54. /**
  55. * Operations on the end of flush process
  56. *
  57. * @param object $om - object manager
  58. * @return void
  59. */
  60. function onFlushEnd($om);
  61. }