databoxConnectionProvider = $connectionProvider; $this->collectionFactory = $collectionFactory; $this->collectionReferenceRepository = $referenceRepository; } /** * @param int $databoxId * @return CollectionRepository */ public function createRepositoryForDatabox($databoxId) { $connection = $this->databoxConnectionProvider->getConnection($databoxId); return new DbalCollectionRepository( $databoxId, $connection, $this->collectionReferenceRepository, $this->collectionFactory ); } }