|
@@ 297-304 (lines=8) @@
|
| 294 |
|
* @param string $documentName |
| 295 |
|
* @throws \InvalidArgumentException |
| 296 |
|
*/ |
| 297 |
|
public function deleteDocumentIndexes($documentName) |
| 298 |
|
{ |
| 299 |
|
$class = $this->dm->getClassMetadata($documentName); |
| 300 |
|
if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { |
| 301 |
|
throw new \InvalidArgumentException('Cannot delete document indexes for mapped super classes or embedded documents.'); |
| 302 |
|
} |
| 303 |
|
$this->dm->getDocumentCollection($documentName)->deleteIndexes(); |
| 304 |
|
} |
| 305 |
|
|
| 306 |
|
/** |
| 307 |
|
* Create all the mapped document collections in the metadata factory. |
|
@@ 395-402 (lines=8) @@
|
| 392 |
|
* @param string $documentName |
| 393 |
|
* @throws \InvalidArgumentException |
| 394 |
|
*/ |
| 395 |
|
public function dropDocumentDatabase($documentName) |
| 396 |
|
{ |
| 397 |
|
$class = $this->dm->getClassMetadata($documentName); |
| 398 |
|
if ($class->isMappedSuperclass || $class->isEmbeddedDocument) { |
| 399 |
|
throw new \InvalidArgumentException('Cannot drop document database for mapped super classes or embedded documents.'); |
| 400 |
|
} |
| 401 |
|
$this->dm->getDocumentDatabase($documentName)->drop(); |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
/** |
| 405 |
|
* Create all the mapped document databases in the metadata factory. |