invalidDocumentRepository() 공개 정적인 메소드

public static invalidDocumentRepository ( string $className ) : MongoDBException
$className string
리턴 MongoDBException
예제 #1
0
 /**
  * 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;
 }