PHP 클래스 Tale\Jade\Renderer\Adapter\Stream\Wrapper

파일 보기 프로젝트 열기: talesoft/tale-jade 1 사용 예제들

공개 메소드들

메소드 설명
isRegistered ( string $name ) : boolean Checks if a stream wrapper with the given scheme/name is registered.
register ( string $name ) Registers this class a a stream wrapper with the given scheme/name.
stream_eof ( ) : boolean Gets called when someone calls something like feof on this stream.
stream_open ( string $uri, string $mode, integer $options, &$opened_path ) : boolean This gets called when a url-stream is opened with the wrapper-scheme.
stream_read ( integer $length ) : string This gets called when anything tries to read from this.
stream_stat ( ) : array This gets called when someone calls fstat on this stream.
stream_tell ( ) : integer Gets called when someone calls something like ftell on this stream.
unregister ( string $name ) Unregisters the stream wrapper with the given scheme/name.

메소드 상세

isRegistered() 공개 정적인 메소드

Checks if a stream wrapper with the given scheme/name is registered.
또한 보기: stream_get_wrappers
public static isRegistered ( string $name ) : boolean
$name string The scheme/name of the stream wrapper
리턴 boolean

register() 공개 정적인 메소드

Registers this class a a stream wrapper with the given scheme/name.
또한 보기: stream_wrapper_register
public static register ( string $name )
$name string The scheme/name this wrapper should react on

stream_eof() 공개 메소드

Returns true, if the stream is at the end of data or false, if there's still PHTML left to read
public stream_eof ( ) : boolean
리턴 boolean

stream_open() 공개 메소드

(e.g. fopen('tale-jade://data;...'), INCLUDE('tale-jade://data;...')
public stream_open ( string $uri, string $mode, integer $options, &$opened_path ) : boolean
$uri string the Data-URI this stream was opened with
$mode string the stream read/write-mode (useless here)
$options integer the flags for this stream instance (useless here)
리턴 boolean

stream_read() 공개 메소드

(opened) stream (e.g. fread, fgets, fgetcsv, INCLUDE(!!!) etc.) We return the fitting chunk of our PHTML and add that length of that to our current position so that the next call will read the next chunk, rinse and repeat
public stream_read ( integer $length ) : string
$length integer the length of the chunk to read
리턴 string

stream_stat() 공개 메소드

It's a requirement to define stream_stat() for some functions We just return an empty array
public stream_stat ( ) : array
리턴 array

stream_tell() 공개 메소드

Returns the current position in our stream
public stream_tell ( ) : integer
리턴 integer

unregister() 공개 정적인 메소드

Unregisters the stream wrapper with the given scheme/name.
또한 보기: stream_wrapper_unregister
public static unregister ( string $name )
$name string The scheme/name of the stream wrapper to be unregistered