Property | Type | Description | |
---|---|---|---|
$context | associated stream resource context. This property is set automatically by PHP once wrapper is instantiated. |
Method | Description | |
---|---|---|
getContextOptions ( ) : array | Returns options associated with [[context]]. | |
register ( string $protocol = 'gridfs', boolean $force = false ) | Registers this steam wrapper. | |
stream_close ( ) | Closes a resource. | |
stream_eof ( ) : boolean | Tests for end-of-file on a file pointer. | |
stream_flush ( ) : boolean | 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. | |
stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean | Opens file. | |
stream_read ( integer $count ) : string | false | Reads from stream. | |
stream_seek ( integer $offset, integer $whence = SEEK_SET ) : boolean | Seeks to specific location in a stream. | |
stream_stat ( ) : array | Retrieve information about a file resource. | |
stream_tell ( ) : integer | Retrieve the current position of a stream. | |
stream_write ( string $data ) : integer | Writes to stream. |
Method | Description | |
---|---|---|
fetchCollection ( ) : |
Fetches associated file collection from stream options. | |
fileStatisticsTemplate ( ) : array | Default template for file statistic data set. | |
parsePath ( string $path ) | Parses stream open path, initializes internal parameters. | |
prepareDownload ( ) : boolean | Prepares Download instance for the read operations. | |
prepareUpload ( ) : boolean | Prepares Upload instance for the write operations. |
public getContextOptions ( ) : array | ||
return | array | context options. |
public stream_eof ( ) : boolean | ||
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. |
public stream_flush ( ) : boolean | ||
return | boolean | whether cached data was successfully stored. |
public stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean | ||
$path | string | specifies the URL that was passed to the original function. |
$mode | string | mode used to open the file, as detailed for `fopen()`. |
$options | integer | additional flags set by the streams API. |
$openedPath | string | real opened path. |
return | boolean | whether operation is successful. |
public stream_read ( integer $count ) : string | false | ||
$count | integer | count of bytes of data from the current position should be returned. |
return | string | false | if there are less than count bytes available, return as many as are available. If no more data is available, return `false`. |
public stream_seek ( integer $offset, integer $whence = SEEK_SET ) : boolean | ||
$offset | integer | The stream offset to seek to. |
$whence | integer | Possible values: - SEEK_SET - Set position equal to offset bytes. - SEEK_CUR - Set position to current location plus offset. - SEEK_END - Set position to end-of-file plus offset. |
return | boolean | Return true if the position was updated, false otherwise. |
public stream_stat ( ) : array | ||
return | array | file statistic information. |
public stream_tell ( ) : integer | ||
return | integer | Should return the current position of the stream. |
public stream_write ( string $data ) : integer | ||
$data | string | string to be stored into the underlying stream. |
return | integer | the number of bytes that were successfully stored. |