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.
파일 보기 프로젝트 열기: jackalope/jackalope

공개 메소드들

메소드 설명
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).