public function createCollection($name, $options = [])
    {
        try {
            if (isset($options['capped'])) {
                $options['capped'] = (bool) $options['capped'];
            }

            $this->db->createCollection($name, $options);
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            return false;
        }

        return $this->selectCollection($name);
    }
public function createCollection($name, $options = [])
    {
        try {
            if (isset($options['capped'])) {
                $options['capped'] = (bool) $options['capped'];
            }

            $this->db->createCollection($name, $options);
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            return false;
        }

        return $this->selectCollection($name);
    }
public function createCollection ( $ name , $ options = [ ] ) { try { if ( isset ( $ options [ 'capped' ] ) ) { $ options [ 'capped' ] = ( bool ) $ options [ 'capped' ] ; } $ this -> db -> createCollection ( $ name , $ options ) ; } catch ( \ MongoDB \ Driver \ Exception \ Exception $ e ) { return false ; } return $ this -> selectCollection ( $ name ) ; }
Creates a collection

@link http://www.php.net/manual/en/mongodb.createcollection.php
@param string $name The name of the collection.
@param array $options
@return MongoCollection Returns a collection object representing the new collection.
Creates a collection