cannotPersistMappedSuperclass() публичный статический Метод

public static cannotPersistMappedSuperclass ( string $className ) : MongoDBException
$className string
Результат MongoDBException
Пример #1
0
 /**
  * Persists a document as part of the current unit of work.
  *
  * @param object $document The document to persist.
  * @throws MongoDBException If trying to persist MappedSuperclass.
  * @throws \InvalidArgumentException If there is something wrong with document's identifier.
  */
 public function persist($document)
 {
     $class = $this->dm->getClassMetadata(get_class($document));
     if ($class->isMappedSuperclass) {
         throw MongoDBException::cannotPersistMappedSuperclass($class->name);
     }
     $visited = array();
     $this->doPersist($document, $visited);
 }