Documentation

ResourceWrapper
in package
implements StreamInterface

A wrapper for a resource providing it with a PSR-7 StreamInterface API.

Tags
author

zozlak

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

Methods

__construct()

public __construct(resource $resource) : mixed
Parameters
$resource : resource

getMetadata()

public getMetadata([mixed $key = null ]) : mixed
Parameters
$key : mixed = null

read()

public read(int $length) : string
Parameters
$length : int
Return values
string

seek()

public seek(int $offset[, int $whence = SEEK_SET ]) : void
Parameters
$offset : int
$whence : int = SEEK_SET
Tags
throws
RuntimeException

write()

public write(string $string) : int
Parameters
$string : string
Return values
int

        
On this page

Search results