PHP Class Imbo\Storage\GridFS
A GridFS storage driver for Imbo
Valid parameters for this driver:
-
(string) databaseName
Name of the database. Defaults to 'imbo_storage'
-
(string) server
The server string to use when connecting to MongoDB. Defaults to
'mongodb://localhost:27017'
-
(array) options
Options to use when creating the Mongo client instance. Defaults to
['connect' => true, 'connectTimeoutMS' => 1000].
Mostra file
Open project: imbo/imbo
Class Usage Examples
Public Methods
Protected Methods
Method |
Description |
|
getGrid ( ) : MongoGridFS |
Get the grid instance |
|
getMongoClient ( ) : MongoClient |
Get the mongo client instance |
|
Private Methods
Method Details
__construct()
public method
public __construct ( array $params = null, MongoClient $client = null, MongoGridFS $grid = null ) |
$params |
array |
Parameters for the driver |
$client |
MongoClient |
Mongo client instance |
$grid |
MongoGridFS |
MongoGridFS instance |
public delete ( $user, $imageIdentifier ) |
getGrid()
protected method
protected getGrid ( ) : MongoGridFS |
return |
MongoGridFS |
|
public getImage ( $user, $imageIdentifier ) |
getLastModified()
public method
getMongoClient()
protected method
Get the mongo client instance
getStatus()
public method
imageExists()
public method
public store ( $user, $imageIdentifier, $imageData ) |