PHP Class TestPhpInputStream

Author: Jaroslav Hanslík
显示文件 Open project: jyxo/php Class Usage Examples

Public Methods

Method Description
register ( ) : boolean Registers protocol.
setContent ( string $content ) Sets content.
stream_close ( ) : boolean Closes file.
stream_eof ( ) : boolean Determines if we have reached the end of the file.
stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean Opens file.
stream_read ( integer $length ) : string Reads from file.
stream_stat ( ) : array Returns information about the file.
unregister ( ) : boolean Unregisters protocol.

Method Details

register() public static method

Registers protocol.
public static register ( ) : boolean
return boolean

setContent() public static method

Sets content.
public static setContent ( string $content )
$content string Content

stream_close() public method

Closes file.
public stream_close ( ) : boolean
return boolean

stream_eof() public method

Determines if we have reached the end of the file.
public stream_eof ( ) : boolean
return boolean

stream_open() public method

Opens file.
public stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean
$path string File path
$mode string File mode
$options integer Options
$openedPath string Opened path
return boolean

stream_read() public method

Reads from file.
public stream_read ( integer $length ) : string
$length integer Read length
return string

stream_stat() public method

Returns information about the file.
public stream_stat ( ) : array
return array

unregister() public static method

Unregisters protocol.
public static unregister ( ) : boolean
return boolean