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

Datei anzeigen Open project: phalcon/incubator Class Usage Examples

Public Methods

Method 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

Method Description
advanceChunks ( )
initEmptyBuffer ( )

Method Details

__construct() public method

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

close() public method

public close ( )

downloadNumBytes() public method

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
return string

downloadToStream() public method

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

getFile() public method

public getFile ( )

getId() public method

public getId ( )

getSize() public method

public getSize ( )

isEOF() public method

public isEOF ( )