downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoGridFS::drop> <MongoGridFS
[edit] Last updated: Fri, 18 Sep 2009

view this page in

MongoGridFS::__construct

(PECL mongo >=0.9.0)

MongoGridFS::__constructCreates new file collections

Описание

MongoGridFS::__construct ( MongoDB $db [, string $files = NULL [, string $chunks = NULL ]] )

Files as stored across two collections, the first containing file meta information, the second containing chunks of the actual file. By default, fs.files and fs.chunks are the collection names used.

Use one argument to specify a prefix other than "fs":

$fs = new MongoGridFS($db, "myfiles");
uses myfiles.files and myfiles.chunks collections.

Use two arguments to fully specify the collection names:

$fs = new MongoGridFS($db, "myfiles", "mychunks");
uses myfiles and mychunks collections.

Параметри

db

Database.

files

Optional files collection name. If chunks is not given, files is used as both collections' prefix.

chunks

Optional chunks collection name.



add a note add a note User Contributed Notes MongoGridFS::__construct
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites