Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 734 Bytes

gridFs.md

File metadata and controls

27 lines (17 loc) · 734 Bytes

GridFS

Prerequisites

In order to use GridFS adapter, you should have accesible MongoDB instance and Mongo PHP driver installed.

You can install the Mongo extension with

pecl install mongo

N.B. mongo php extension is deprecated in favor of MongoDB PHP driver. We will switch to it right after new API supports GridFS.

Usage

$client = new \MongoClient('mongodb://localhost:27007'); 
$db = $client->selectDB('dbname');
$gridFs = new \MongoGridFs($db);

$adapter = new \Gaufrette\Adapter\GridFS($gridFs);