queue = array(); $this->limit = $limit ? $limit : -1; return $this; } /** * Adds a new cURL handle to the request queue. * * @param resource $handle (Required) A cURL resource to add to the queue. * @return $this A reference to the current instance. */ public function add($handle) { $this->queue[] = $handle; return $this; } /** * Executes the batch request queue. * * @param array $opt (DO NOT USE) Enabled for compatibility with the method this overrides, although any values passed will be ignored. * @return array An indexed array of objects. */ public function send($opt = null) { $http = new $this->request_class(); // Make the request $response = $http->send_multi_request($this->queue, array( 'limit' => $this->limit )); return $response; } }