/**
* Sets default repository class.
*
* @param string $className
*
* @return void
*
* @throws MongoDBException If not is a ObjectRepository
*/
public function setDefaultRepositoryClassName($className)
{
$reflectionClass = new \ReflectionClass($className);
if (!$reflectionClass->implementsInterface(ObjectRepository::class)) {
throw MongoDBException::invalidDocumentRepository($className);
}
$this->attributes['defaultRepositoryClassName'] = $className;
}