PHP Class Phalcon\Db\Adapter\MongoDB\GridFS\ReadableStream

Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( CollectionWrapper $collectionWrapper, stdClass $file ) Constructs a readable GridFS stream.
close ( )
downloadNumBytes ( integer $numBytes ) : string Read bytes from the stream.
downloadToStream ( resource $destination ) Writes the contents of this GridFS file to a writable stream.
getFile ( )
getId ( )
getSize ( )
isEOF ( )

Private Methods

Méthode Description
advanceChunks ( )
initEmptyBuffer ( )

Method Details

__construct() public méthode

Constructs a readable GridFS stream.
public __construct ( CollectionWrapper $collectionWrapper, stdClass $file )
$collectionWrapper CollectionWrapper GridFS collection wrapper
$file stdClass GridFS file document

close() public méthode

public close ( )

downloadNumBytes() public méthode

Note: this method may return a string smaller than the requested length if data is not available to be read.
public downloadNumBytes ( integer $numBytes ) : string
$numBytes integer Number of bytes to read
Résultat string

downloadToStream() public méthode

Writes the contents of this GridFS file to a writable stream.
public downloadToStream ( resource $destination )
$destination resource Writable stream

getFile() public méthode

public getFile ( )

getId() public méthode

public getId ( )

getSize() public méthode

public getSize ( )

isEOF() public méthode

public isEOF ( )