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].
Author: Christer Edvartsen ([email protected])
Inheritance: implements Imbo\Storage\StorageInterface
Afficher le fichier Open project: imbo/imbo Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $params = null, MongoClient $client = null, MongoGridFS $grid = null ) Class constructor
delete ( $user, $imageIdentifier )
getImage ( $user, $imageIdentifier )
getLastModified ( $user, $imageIdentifier )
getStatus ( )
imageExists ( $user, $imageIdentifier )
store ( $user, $imageIdentifier, $imageData )

Méthodes protégées

Méthode Description
getGrid ( ) : MongoGridFS Get the grid instance
getMongoClient ( ) : MongoClient Get the mongo client instance

Private Methods

Méthode Description
getImageObject ( string $user, string $imageIdentifier ) : boolean | MongoGridFSFile Get an image object

Method Details

__construct() public méthode

Class constructor
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

delete() public méthode

public delete ( $user, $imageIdentifier )

getGrid() protected méthode

Get the grid instance
protected getGrid ( ) : MongoGridFS
Résultat MongoGridFS

getImage() public méthode

public getImage ( $user, $imageIdentifier )

getLastModified() public méthode

public getLastModified ( $user, $imageIdentifier )

getMongoClient() protected méthode

Get the mongo client instance
protected getMongoClient ( ) : MongoClient
Résultat MongoClient

getStatus() public méthode

public getStatus ( )

imageExists() public méthode

public imageExists ( $user, $imageIdentifier )

store() public méthode

public store ( $user, $imageIdentifier, $imageData )