pocketmine\scheduler\TaskHandler::getTaskId PHP Method

getTaskId() public method

public getTaskId ( ) : integer
return integer
    public function getTaskId()
    {
        return $this->taskId;
    }

Usage Example

Example #1
0
 private function handle(TaskHandler $handler)
 {
     if ($handler->isDelayed()) {
         $nextRun = $this->currentTick + $handler->getDelay();
     } else {
         $nextRun = $this->currentTick;
     }
     $handler->setNextRun($nextRun);
     $this->tasks[$handler->getTaskId()] = $handler;
     $this->queue->insert($handler, $nextRun);
     return $handler;
 }