PHP 클래스 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].
저자: Christer Edvartsen ([email protected])
상속: implements Imbo\Storage\StorageInterface
파일 보기 프로젝트 열기: imbo/imbo 1 사용 예제들

공개 메소드들

메소드 설명
__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 )

보호된 메소드들

메소드 설명
getGrid ( ) : MongoGridFS Get the grid instance
getMongoClient ( ) : MongoClient Get the mongo client instance

비공개 메소드들

메소드 설명
getImageObject ( string $user, string $imageIdentifier ) : boolean | MongoGridFSFile Get an image object

메소드 상세

__construct() 공개 메소드

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 delete ( $user, $imageIdentifier )

getGrid() 보호된 메소드

Get the grid instance
protected getGrid ( ) : MongoGridFS
리턴 MongoGridFS

getImage() 공개 메소드

public getImage ( $user, $imageIdentifier )

getLastModified() 공개 메소드

public getLastModified ( $user, $imageIdentifier )

getMongoClient() 보호된 메소드

Get the mongo client instance
protected getMongoClient ( ) : MongoClient
리턴 MongoClient

getStatus() 공개 메소드

public getStatus ( )

imageExists() 공개 메소드

public imageExists ( $user, $imageIdentifier )

store() 공개 메소드

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