PHP Класс Jackalope\BinaryStreamWrapper

The stream is registered for the protocol "jackalope://". The URL must contain the sessions registryKey as the host part and the oath of the binary property as the path part, e.g. "jackalope://abc0123/content/node/binary" For multivalued properties the url also contains the position of the stream in the property array in the port field and a token to identify all streams loaded by the single backend call in an static array as username. The loading from the backend is deferred until the stream is accessed. Then it is loaded and all stream functions are passed on to the underlying stream. This means after closing the Session, streams can no longer be accessed.
Показать файл Открыть проект

Открытые методы

Метод Описание
stream_close ( ) Close this stream if it was initialized
stream_eof ( ) : boolean Make sure the stream is ready and check whether the stream is at its end.
stream_flush ( ) Flush all data written to this stream if the stream was initialized.
stream_open ( string $path, integer $mode, integer $options, mixed &$opened_path ) : boolean Get the information and store it for later usage.
stream_read ( integer $count ) : string Make sure the stream is ready and read from the underlying stream.
stream_seek ( integer $offset, integer $whence ) : integer Make sure the stream is ready and position the file pointer to the specified position.
stream_stat ( ) : array Make sure the stream is ready and get information about the stream.
stream_tell ( ) Make sure the stream is ready and specify the position in the stream.
stream_write ( string $data ) : integer Make sure the stream is ready and write to the underlying stream.
url_stat ( string $path, integer $flags ) : array Retrieve information about a file

Приватные методы

Метод Описание
init_stream ( ) Check whether stream was already loaded, otherwise fetch from backend and cache it.

Описание методов

stream_close() публичный Метод

Close this stream if it was initialized
public stream_close ( )

stream_eof() публичный Метод

Make sure the stream is ready and check whether the stream is at its end.
public stream_eof ( ) : boolean
Результат boolean true if the stream has ended.

stream_flush() публичный Метод

Flush all data written to this stream if the stream was initialized.
public stream_flush ( )

stream_open() публичный Метод

Get the information and store it for later usage.
public stream_open ( string $path, integer $mode, integer $options, mixed &$opened_path ) : boolean
$path string the backend path for this stream
$mode integer ignored
$options integer ignored
$opened_path mixed ignored
Результат boolean true on success

stream_read() публичный Метод

Make sure the stream is ready and read from the underlying stream.
public stream_read ( integer $count ) : string
$count integer How many bytes to read from the stream.
Результат string data from the stream in utf-8 format.

stream_seek() публичный Метод

Make sure the stream is ready and position the file pointer to the specified position.
public stream_seek ( integer $offset, integer $whence ) : integer
$offset integer the position in the stream in bytes from the beginning
$whence integer whether to seek relative or absolute
Результат integer

stream_stat() публичный Метод

Make sure the stream is ready and get information about the stream.
public stream_stat ( ) : array
Результат array

stream_tell() публичный Метод

Make sure the stream is ready and specify the position in the stream.
public stream_tell ( )

stream_write() публичный Метод

Make sure the stream is ready and write to the underlying stream.
public stream_write ( string $data ) : integer
$data string the data to write to the stream (utf-8)
Результат integer

url_stat() публичный Метод

Retrieve information about a file
См. также: http://php.net/manual/en/streamwrapper.url-stat.php
public url_stat ( string $path, integer $flags ) : array
$path string The backend path for this stream, e.g. jackalope://abc0123/content/node/binary
$flags integer ignored
Результат array Should return as many elements as stat() does. Unknown or unavailable values should be set to a rational value (usually 0).