mongodb\file\StreamWrapper stream_flush()

stream_flush() public method This method is called in response to fflush() and when the stream is being closed while any unflushed data has been written to it before. See also \yii\mongodb\file\fflush(). public boolean stream_flush ( )return boolean Whether cached data was successfully stored.

mongodb\file\StreamWrapper stream_eof()

stream_eof() public method Tests for end-of-file on a file pointer. This method is called in response to feof(). See also \yii\mongodb\file\feof(). public boolean stream_eof ( )return boolean true if the read/write position is at the end of the stream and if no more data is available to be read, or false otherwise.

mongodb\file\StreamWrapper stream_close()

stream_close() public method Closes a resource. This method is called in response to fclose(). See also \yii\mongodb\file\fclose(). public void stream_close ( )

mongodb\file\StreamWrapper register()

register() public static method Registers this steam wrapper. public static void register ( $protocol = 'gridfs', $force = false )$protocol string Name of the protocol to be used. $force boolean Whether to register wrapper, even if protocol is already taken.

mongodb\file\StreamWrapper getContextOptions()

getContextOptions() public method Returns options associated with $context. public array getContextOptions ( )return array Context options.

mongodb\file\StreamWrapper $contextOptions

$contextOptions public read-only property Context options. public array getContextOptions ( )

mongodb\file\StreamWrapper $context

$context public property Associated stream resource context. This property is set automatically by PHP once wrapper is instantiated. public resource $context = null

mongodb\file\Query getCollection()

getCollection() public method Returns the Mongo collection for this query. public yii\mongodb\file\Collection getCollection ( $db = null )$db yii\mongodb\Connection Mongo connection. return yii\mongodb\file\Collection Collection instance.

mongodb\file\Query $collection

$collection public read-only property Collection instance. public yii\mongodb\file\Collection getCollection ( $db = null )

mongodb\file\Download write()

write() public method Alias of toFile() method. public integer write ( $filename )$filename string Name of the physical file. return integer Number of written bytes.