Methods summary
public
|
|
public
string
|
#
__toString( )
Returns
string
Inheritdoc
Implementation of
|
public
|
#
close( )
Inheritdoc
Implementation of
|
public
resource|null
|
#
detach( )
Returns
resource|null Underlying PHP stream, if any
Inheritdoc
Implementation of
|
public
integer|null
|
#
getSize( )
Returns
integer|null Returns the size in bytes if known, or null if unknown.
Inheritdoc
Implementation of
|
public
integer
|
#
tell( )
Returns
integer Position of the file pointer
Throws
RuntimeException on error.
Inheritdoc
Implementation of
|
public
boolean
|
#
eof( )
Returns
boolean
Inheritdoc
Implementation of
|
public
boolean
|
#
isSeekable( )
Returns
boolean
Inheritdoc
Implementation of
|
public
boolean
|
#
isWritable( )
Returns
boolean
Inheritdoc
Implementation of
|
public
boolean
|
#
isReadable( )
Returns
boolean
Inheritdoc
Implementation of
|
public
|
#
seek( integer $offset, integer $whence = SEEK_SET )
Parameters
- $offset
- Stream offset
- $whence
Specifies how the cursor position will be calculated
based on the seek offset. Valid values are identical to the built-in
PHP $whence values for fseek() . SEEK_SET: Set position equal to
offset bytes SEEK_CUR: Set position to current location plus offset
SEEK_END: Set position to end-of-stream plus offset.
Throws
RuntimeException on failure.
Inheritdoc
Implementation of
|
public
|
#
rewind( )
Throws
RuntimeException on failure.
Inheritdoc
Implementation of
|
public
integer
|
#
write( string $string )
Parameters
- $string
- The string that is to be written.
Returns
integer Returns the number of bytes written to the stream.
Throws
RuntimeException on failure.
Inheritdoc
Implementation of
|
public
string
|
#
read( integer $length )
Parameters
- $length
Read up to $length bytes from the object and return
them. Fewer than $length bytes may be returned if underlying stream
call returns fewer bytes.
Returns
string Returns the data read from the stream, or an empty string
if no bytes are available.
Throws
RuntimeException if an error occurs.
Inheritdoc
Implementation of
|
public
string
|
#
getContents( )
Returns
string
Throws
RuntimeException if unable to read or an error occurs while
reading.
Inheritdoc
Implementation of
|
public
array|mixed|null
|
#
getMetadata( string $key = null )
Parameters
- $key
- Specific metadata to retrieve.
Returns
array|mixed|null Returns an associative array if no key is
provided. Returns a specific key value if a key is provided and the
value is found, or null if the key is not found.
Inheritdoc
Implementation of
|
protected
|
|