@@ 295-302 (lines=8) @@ | ||
292 | * @param string $documentName |
|
293 | * @throws \InvalidArgumentException |
|
294 | */ |
|
295 | public function deleteDocumentIndexes($documentName) |
|
296 | { |
|
297 | $class = $this->dm->getClassMetadata($documentName); |
|
298 | if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) { |
|
299 | throw new \InvalidArgumentException('Cannot delete document indexes for mapped super classes, embedded documents or query result documents.'); |
|
300 | } |
|
301 | $this->dm->getDocumentCollection($documentName)->deleteIndexes(); |
|
302 | } |
|
303 | ||
304 | /** |
|
305 | * Create all the mapped document collections in the metadata factory. |
|
@@ 365-372 (lines=8) @@ | ||
362 | * @param string $documentName |
|
363 | * @throws \InvalidArgumentException |
|
364 | */ |
|
365 | public function dropDocumentCollection($documentName) |
|
366 | { |
|
367 | $class = $this->dm->getClassMetadata($documentName); |
|
368 | if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) { |
|
369 | throw new \InvalidArgumentException('Cannot delete document indexes for mapped super classes, embedded documents or query result documents.'); |
|
370 | } |
|
371 | $this->dm->getDocumentCollection($documentName)->drop(); |
|
372 | } |
|
373 | ||
374 | /** |
|
375 | * Drop all the mapped document databases in the metadata factory. |
|
@@ 393-400 (lines=8) @@ | ||
390 | * @param string $documentName |
|
391 | * @throws \InvalidArgumentException |
|
392 | */ |
|
393 | public function dropDocumentDatabase($documentName) |
|
394 | { |
|
395 | $class = $this->dm->getClassMetadata($documentName); |
|
396 | if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) { |
|
397 | throw new \InvalidArgumentException('Cannot drop document database for mapped super classes, embedded documents or query result documents.'); |
|
398 | } |
|
399 | $this->dm->getDocumentDatabase($documentName)->drop(); |
|
400 | } |
|
401 | ||
402 | /** |
|
403 | * Create all the mapped document databases in the metadata factory. |