1: <?php
2: /**
3: * Stores queue tasks in the current request. No persistence.
4: */
5: class Horde_Queue_Storage_Array extends Horde_Queue_Storage_Base
6: {
7: protected $_tasks = array();
8:
9: public function add($task)
10: {
11: $this->_tasks[] = $task;
12: }
13:
14: public function getMany($num = 50)
15: {
16: return array_splice($this->_tasks, 0, $num);
17: }
18: }
19: