MongoCursor::valid
MongoGridFS::__construct
Mongo
PHP Manual

# The MongoGridFS class

## Introducción

Utilities for storing and retreiving files from the database.

## Class synopsis

MongoGridFS
extends MongoCollection {
/* Methods */
__construct ( MongoDB `$db` [, string `$files`= `NULL` [, string `$chunks`= `NULL` ]] )
public array drop ( void )
public MongoGridFSCursor find ([ array `$query`= array() [, array `$fields`= array() ]] )
public MongoGridFSFile findOne ([ mixed `$query`= array() ] )
public boolean remove ([ array `$criteria`= array() [, boolean `$just_one`= `FALSE` ]] )
public MongoId storeFile ( string `$filename` [, array `$extra`= array() ] )
public MongoId storeUpload ( string `$name` [, array `$extra` ] )
}

## Table of Contents

- MongoGridFS::__construct — Creates new file collections
- MongoGridFS::drop — Drops the files and chunks collections
- MongoGridFS::find — Queries for files
- MongoGridFS::findOne — Returns a single file matching the criteria
- MongoGridFS::remove — Removes files from the collections
- MongoGridFS::storeFile — Stores a file in the database
- MongoGridFS::storeUpload — Saves an uploaded file to the database

MongoCursor::valid
MongoGridFS::__construct
Mongo
PHP Manual