public static invalidDocumentRepository ( string $className ) : |
||
$className | string | |
Résultat |
public static function invalidDocumentRepository($className)
{
return new self("Invalid repository class '" . $className . "'. It must be a Doctrine\\Common\\Persistence\\ObjectRepository.");
}
/** * 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; }