| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Plausible\Analytics\WP\Client\Lib\GuzzleHttp\Promise; |
| 6 |
|
| 7 |
interface TaskQueueInterface |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Returns true if the queue is empty. |
| 11 |
*/ |
| 12 |
public function isEmpty(): bool; |
| 13 |
|
| 14 |
/** |
| 15 |
* Adds a task to the queue that will be executed the next time run is |
| 16 |
* called. |
| 17 |
*/ |
| 18 |
public function add(callable $task): void; |
| 19 |
|
| 20 |
/** |
| 21 |
* Execute all of the pending task in the queue. |
| 22 |
*/ |
| 23 |
public function run(): void; |
| 24 |
} |
| 25 |
|