league/flysystem-gridfs

Flysystem adapter for MongoDB GridFS

1.0.0 2015-01-21 22:20 UTC

README

Author Build Status Coverage Status Quality Score Software License Packagist Version Total Downloads

This is a Flysystem adapter for the MongoDB's GridFS.

Installation

composer require league/flysystem-gridfs

Bootstrap

<?php
use League\Flysystem\GridFS\GridFSAdapter;
use League\Flysystem\Filesystem;

include __DIR__ . '/vendor/autoload.php';

$mongoClient = new MongoClient();
$gridFs = $mongoClient->selectDB('db_name')->getGridFS();

$adapter = new GridFSAdapter($gridFs);