public function getCollectionNames(array $options = [])
    {
        $includeSystemCollections = false;
        // The includeSystemCollections option is no longer supported in the command
        if (isset($options['includeSystemCollections'])) {
            $includeSystemCollections = $options['includeSystemCollections'];
            unset($options['includeSystemCollections']);
        }

        try {
            $collections = $this->db->listCollections($options);
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            throw ExceptionConverter::toLegacy($e);
        }

        $getCollectionName = function (CollectionInfo $collectionInfo) {
            return $collectionInfo->getName();
        };

        $eligibleCollections = array_filter(
            iterator_to_array($collections),
            $this->getSystemCollectionFilterClosure($includeSystemCollections)
        );

        return array_map($getCollectionName, $eligibleCollections);
    }
public function getCollectionNames(array $options = [])
    {
        $includeSystemCollections = false;
        // The includeSystemCollections option is no longer supported in the command
        if (isset($options['includeSystemCollections'])) {
            $includeSystemCollections = $options['includeSystemCollections'];
            unset($options['includeSystemCollections']);
        }

        try {
            $collections = $this->db->listCollections($options);
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            throw ExceptionConverter::toLegacy($e);
        }

        $getCollectionName = function (CollectionInfo $collectionInfo) {
            return $collectionInfo->getName();
        };

        $eligibleCollections = array_filter(
            iterator_to_array($collections),
            $this->getSystemCollectionFilterClosure($includeSystemCollections)
        );

        return array_map($getCollectionName, $eligibleCollections);
    }
public function getCollectionNames ( array $ options = [ ] ) { $ includeSystemCollections = false ; // The includeSystemCollections option is no longer supported in the command if ( isset ( $ options [ 'includeSystemCollections' ] ) ) { $ includeSystemCollections = $ options [ 'includeSystemCollections' ] ; unset ( $ options [ 'includeSystemCollections' ] ) ; } try { $ collections = $ this -> db -> listCollections ( $ options ) ; } catch ( \ MongoDB \ Driver \ Exception \ Exception $ e ) { throw ExceptionConverter :: toLegacy ( $ e ) ; } $ getCollectionName = function ( CollectionInfo $ collectionInfo ) { return $ collectionInfo -> getName ( ) ; } ; $ eligibleCollections = array_filter ( iterator_to_array ( $ collections ) , $ this -> getSystemCollectionFilterClosure ( $ includeSystemCollections ) ) ; return array_map ( $ getCollectionName , $ eligibleCollections ) ; }
Get all collections from this database

@link http://www.php.net/manual/en/mongodb.getcollectionnames.php
@param array $options An array of options for listing the collections.
@return array Returns the names of the all the collections in the database as an array
Get all collections from this database