linkCache = $linkCache; $this->titleFormatter = $titleFormatter; $this->contentLanguage = $contentLanguage; $this->genderCache = $genderCache; $this->loadBalancer = $loadBalancer; } /** * @param iterable|LinkTarget[] $initialItems Initial items to be added to the batch * @return LinkBatch */ public function newLinkBatch( iterable $initialItems = [] ) : LinkBatch { $batch = new LinkBatch( [], $this->linkCache, $this->titleFormatter, $this->contentLanguage, $this->genderCache, $this->loadBalancer ); foreach ( $initialItems as $item ) { $batch->addObj( $item ); } return $batch; } }