JStreamString
String Stream Wrapper
This class allows you to use a PHP string in the same way that you would normally use a regular stream wrapper
package |
Joomla.Platform |
---|---|
subpackage |
FileSystem |
since |
11.1 |
Methods
stream_eof
End of field check
stream_eof() : boolean
since |
11.1 |
---|
Response
boolean
True if at end of field.
stream_flush
Stream flush, always returns true.
stream_flush() : boolean
since |
11.1 |
---|---|
note |
Data storage is not supported |
Response
boolean
stream_open
Method to open a file or URL.
stream_open(string $path, string $mode, integer $options, &$opened_path) : boolean
since |
11.1 |
---|
Arguments
- $path
string
The stream path.- $mode
string
Not used.- $options
integer
Not used.- $opened_path
Response
boolean
stream_read
Method to read a given number of bytes starting at the current position and moving to the end of the string defined by the current position plus the given number.
stream_read(integer $count) : void
since |
11.1 |
---|---|
see |
Arguments
- $count
integer
Bytes of data from the current position should be returned.
stream_seek
Stream offset
stream_seek(integer $offset, integer $whence) : boolean
since |
11.1 |
---|
Arguments
- $offset
integer
The starting offset.- $whence
integer
SEEK_SET, SEEK_CUR, SEEK_END
Response
boolean
True on success.
stream_stat
Method to retrieve information from a file resource
stream_stat() : array
stream_tell
Method to get the current position
stream_tell() : integer
since |
11.1 |
---|
Response
integer
The position
stream_write
Stream write, always returning false.
stream_write(string $data) : boolean
since |
11.1 |
---|---|
note |
Updating the string is not supported. |
Arguments
- $data
string
The data to write.
Response
boolean
url_stat
Method to retrieve information about a file.
url_stat(string $path, integer $flags) : array
see | |
---|---|
since |
11.1 |
Arguments
- $path
string
File path or URL to stat- $flags
integer
Additional flags set by the streams API
Response
array
Properties
_currentstring
The current string
since |
11.1 |
---|
Type(s)
string
_path
The path
since |
11.1 |
---|
Type(s)
string
_mode
The mode
since |
11.1 |
---|
Type(s)
string
_options
Enter description here .
..
since |
11.1 |
---|
Type(s)
string
_opened_path
Enter description here .
..
since |
11.1 |
---|
Type(s)
string
_pos
Current position
since |
11.1 |
---|
Type(s)
integer
_len
Length of the string
since |
11.1 |
---|
Type(s)
string
_stat
Statistics for a file