public function Batch::addItem in Akamai 7.3
Adds an item to the batch.
File
- src/
Batch.php, line 56 - Contains the \Drupal\akamai\Batch class.
Class
Namespace
Drupal\akamaiCode
public function addItem($item) {
if (empty($this->hostname)) {
$this->hostname = $item->data['hostname'];
}
elseif ($item->data['hostname'] != $this->hostname) {
throw new InvalidArgumentException('All items in a batch must have the same hostname.');
}
$this->items[] = $item;
}