linkCache = $linkCache; $this->titleFormatter = $titleFormatter; $this->contentLanguage = $contentLanguage; $this->genderCache = $genderCache; $this->loadBalancer = $loadBalancer; } /** * @param iterable|iterable $initialItems items to be added * * @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; } }