Queue.php 630 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Elgg\Queue;
  3. /**
  4. * Queue interface
  5. *
  6. * WARNING: API IN FLUX. DO NOT USE DIRECTLY.
  7. *
  8. * @access private
  9. *
  10. * @package Elgg.Core
  11. * @subpackage Queue
  12. * @since 1.9.0
  13. */
  14. interface Queue {
  15. /**
  16. * Add an item to the queue
  17. *
  18. * @param mixed $item Item to add to queue
  19. * @return bool
  20. */
  21. public function enqueue($item);
  22. /**
  23. * Remove an item from the queue
  24. *
  25. * @return mixed
  26. */
  27. public function dequeue();
  28. /**
  29. * Clear all items from the queue
  30. *
  31. * @return void
  32. */
  33. public function clear();
  34. /**
  35. * Get the size of the queue
  36. *
  37. * @return int
  38. */
  39. public function size();
  40. }