PHP Class FOF30\Utils\Buffer

Datei anzeigen Open project: akeeba/fof Class Usage Examples

Public Properties

Property Type Description
$buffers array Buffer hash
$canRegisterWrapper
$name string Buffer name
$position integer Stream position

Public Methods

Method Description
canRegisterWrapper ( ) : boolean Should I register the fof:// stream wrapper
stream_eof ( ) : boolean Function to test for end of file pointer
stream_open ( string $path, string $mode, integer $options, &$opened_path ) : boolean Function to open file or url
stream_read ( integer $count ) : mixed Read stream
stream_seek ( integer $offset, integer $whence ) : boolean The read write position updates in response to $offset and $whence
stream_stat ( )
stream_tell ( ) : integer Function to get the current position of the stream
stream_write ( string $data ) : integer Write stream
unlink ( $path )

Method Details

canRegisterWrapper() public static method

Should I register the fof:// stream wrapper
public static canRegisterWrapper ( ) : boolean
return boolean True if the stream wrapper can be registered

stream_eof() public method

Function to test for end of file pointer
See also: streamWrapper::stream_eof
Since: 11.1
public stream_eof ( ) : boolean
return boolean True if the pointer is at the end of the stream

stream_open() public method

Function to open file or url
See also: streamWrapper::stream_open
public stream_open ( string $path, string $mode, integer $options, &$opened_path ) : boolean
$path string The URL that was passed
$mode string Mode used to open the file @see fopen
$options integer Flags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS
return boolean

stream_read() public method

Read stream
See also: streamWrapper::stream_read
Since: 11.1
public stream_read ( integer $count ) : mixed
$count integer How many bytes of data from the current position should be returned.
return mixed The data from the stream up to the specified number of bytes (all data if the total number of bytes in the stream is less than $count. Null if the stream is empty.

stream_seek() public method

The read write position updates in response to $offset and $whence
See also: streamWrapper::stream_seek
Since: 11.1
public stream_seek ( integer $offset, integer $whence ) : boolean
$offset integer The offset in bytes
$whence integer Position the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END
return boolean True if updated

stream_stat() public method

public stream_stat ( )

stream_tell() public method

Function to get the current position of the stream
See also: streamWrapper::stream_tell
Since: 11.1
public stream_tell ( ) : integer
return integer

stream_write() public method

Write stream
See also: streamWrapper::stream_write
Since: 11.1
public stream_write ( string $data ) : integer
$data string The data to write to the stream.
return integer

Property Details

$buffers public_oe static_oe property

Buffer hash
public static array $buffers
return array

$canRegisterWrapper public_oe static_oe property

public static $canRegisterWrapper

$name public_oe property

Buffer name
public string $name
return string

$position public_oe property

Stream position
public int $position
return integer