Doctrine\ODM\MongoDB\SchemaManager::updateIndexes PHP Метод

updateIndexes() публичный Метод

Indexes that exist in MongoDB but not the document metadata will be deleted.
public updateIndexes ( integer $timeout = null )
$timeout integer Timeout (ms) for acknowledged index creation
    public function updateIndexes($timeout = null)
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) {
                continue;
            }
            $this->updateDocumentIndexes($class->name, $timeout);
        }
    }

Usage Example

Пример #1
0
 /**
  * @param SchemaManager $sm
  */
 protected function processIndex(SchemaManager $sm)
 {
     $sm->updateIndexes($this->timeout);
 }
All Usage Examples Of Doctrine\ODM\MongoDB\SchemaManager::updateIndexes