1 | <?php |
||
10 | class FirstAvailable extends SplQueue implements ScheduleInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var callable |
||
14 | */ |
||
15 | protected $callbackFilter; |
||
16 | |||
17 | /** |
||
18 | * Initialize the priority schedule |
||
19 | */ |
||
20 | public function __construct() |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | * |
||
33 | * $callback Should accept a single parameter and return a bool |
||
34 | * (true if valid, false otherwise) |
||
35 | */ |
||
36 | public function setCallback(callable $callback) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function insert($item) |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function extract() |
||
64 | } |
||
65 |