Phalcon\Db\Adapter\MongoDB\GridFS\CollectionWrapper::ensureIndexes PHP Method

ensureIndexes() private method

This method is called once before the first write operation on a GridFS bucket. Indexes are only be created if the files collection is empty.
private ensureIndexes ( )
    private function ensureIndexes()
    {
        if ($this->checkedIndexes) {
            return;
        }
        $this->checkedIndexes = true;
        if (!$this->isFilesCollectionEmpty()) {
            return;
        }
        $this->ensureFilesIndex();
        $this->ensureChunksIndex();
    }