Skip to content

BulkCurlTask ​

class · pocketmine\scheduler\BulkCurlTask · source

Extends AsyncTask

Executes a consecutive list of cURL operations.

The result of this AsyncTask is an array of arrays (returned from Internet::simpleCurl) or InternetException objects.

Methods ​

__construct() ​

php
public function __construct(array $operations, \Closure $onCompletion)

BulkCurlTask constructor.

$operations accepts an array of arrays. Each member array must contain a string mapped to "page", and optionally, "timeout", "extraHeaders" and "extraOpts". Documentation of these options are same as those in Internet::simpleCurl.

onCompletion() ​

php
public function onCompletion() : void

onRun() ​

php
public function onRun() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.