Свойство | Тип | Описание | |
---|---|---|---|
$context | associated stream resource context. This property is set automatically by PHP once wrapper is instantiated. |
Метод | Описание | |
---|---|---|
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. |
Метод | Описание | |
---|---|---|
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 | ||
Результат | array | context options. |
public stream_close ( ) |
public stream_eof ( ) : boolean | ||
Результат | 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 | ||
Результат | 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. |
Результат | 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. |
Результат | 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. |
Результат | boolean | Return true if the position was updated, false otherwise. |
public stream_stat ( ) : array | ||
Результат | array | file statistic information. |
public stream_tell ( ) : integer | ||
Результат | 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. |
Результат | integer | the number of bytes that were successfully stored. |