This is automatic generated document for things in Swow\Psr7\Message\PhpStream class

Class PhpStream

Refactored from https://github.com/Nyholm/psr7/blob/master/src/Stream.php

Constants

protected READ_WRITE_HASH = {"read":{"r":true,"w+":true,"r+":true,"x+":true,"c+":true,"rb":true,"w+b":true,"r+b":true,"x+b":true,"c+b":true,"rt":true,"w+t":true,"r+t":true,"x+t":true,"c+t":true,"a+":true},"write":{"w":true,"w+":true,"rw":true,"r+":true,"x+":true,"c+":true,"wb":true,"w+b":true,"r+b":true,"x+b":true,"c+b":true,"w+t":true,"r+t":true,"x+t":true,"c+t":true,"a":true,"a+":true}}

Properties

protected $detached protected $readable protected $seekable protected $size protected $stream protected $uri protected $writable

Methods

Method __construct

public function __construct ( resource $resource )

Param resource $resource php stream resource

Method __destruct

public function __destruct ( )

Method close

public function close ( ) : void

Method detach

public function detach ( ) : mixed

Method eof

public function eof ( ) : bool

Method getContents

public function getContents ( ) : string

Method getMetadata

public function getMetadata ( mixed $key ) : mixed

Method getSize

public function getSize ( ) : ?int

Method getUri

protected function getUri ( ) : ?string

Method isReadable

public function isReadable ( ) : bool

Method isSeekable

public function isSeekable ( ) : bool

Method isWritable

public function isWritable ( ) : bool

Method read

public function read ( $length ) : string

Method rewind

public function rewind ( ) : void

Method seek

public function seek ( $offset , $whence ) : void

Method tell

public function tell ( ) : int

Method toString

public function toString ( ) : string

Method write

public function write ( $string ) : int

Copyright 2022 the Swow contributors