Task implementation which allows closures to be called by a scheduler.
Example usage:
Definition at line 41 of file ClosureTask.php.
◆ __construct()
pocketmine\scheduler\ClosureTask::__construct |
( |
private \Closure | $closure | ) |
|
- Parameters
-
\Closure | $closure | Must accept zero parameters @phpstan-param \Closure() : void $closure |
Definition at line 46 of file ClosureTask.php.
◆ getHandler()
pocketmine\scheduler\Task::getHandler |
( |
| ) |
|
|
finalinherited |
◆ getName()
pocketmine\scheduler\ClosureTask::getName |
( |
| ) |
|
◆ onCancel()
pocketmine\scheduler\Task::onCancel |
( |
| ) |
|
|
inherited |
Actions to execute if the Task is cancelled
Definition at line 55 of file Task.php.
◆ onRun()
pocketmine\scheduler\ClosureTask::onRun |
( |
| ) |
|
◆ setHandler()
pocketmine\scheduler\Task::setHandler |
( |
?TaskHandler | $taskHandler | ) |
|
|
finalinherited |
The documentation for this class was generated from the following file: