ResourceWrapper
    
            
            in package
            
        
    
            
            implements
                            StreamInterface                    
    
    
A wrapper for a resource providing it with a PSR-7 StreamInterface API.
Tags
Table of Contents
Interfaces
- StreamInterface
Properties
- $res : resource
Methods
- __construct() : mixed
- __toString() : string
- close() : void
- detach() : resource
- eof() : bool
- getContents() : string
- getMetadata() : mixed
- getSize() : int|null
- isReadable() : bool
- isSeekable() : bool
- isWritable() : bool
- read() : string
- rewind() : void
- seek() : void
- tell() : int
- write() : int
Properties
$res
        private
            resource
    $res
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(resource $resource) : mixed
    Parameters
- $resource : resource
__toString()
    public
                    __toString() : string
    Return values
stringclose()
    public
                    close() : void
    detach()
    public
                    detach() : resource
    Return values
resourceeof()
    public
                    eof() : bool
    Return values
boolgetContents()
    public
                    getContents() : string
    Return values
stringgetMetadata()
    public
                    getMetadata([string|null $key = null ]) : mixed
    Parameters
- $key : string|null = null
getSize()
    public
                    getSize() : int|null
    Return values
int|nullisReadable()
    public
                    isReadable() : bool
    Return values
boolisSeekable()
    public
                    isSeekable() : bool
    Return values
boolisWritable()
    public
                    isWritable() : bool
    Return values
boolread()
    public
                    read(int $length) : string
    Parameters
- $length : int
Return values
stringrewind()
    public
                    rewind() : void
    seek()
    public
                    seek(int $offset[, int $whence = SEEK_SET ]) : void
    Parameters
- $offset : int
- $whence : int = SEEK_SET
Tags
tell()
    public
                    tell() : int
    Return values
intwrite()
    public
                    write(string $string) : int
    Parameters
- $string : string