Copied!

Converts Guzzle streams into PHP stream resources.

  • see https://www.php.net/streamwrapper
Cloneable Final Instantiable
Properties
public $context
 
  • var resource
Methods
public static createStreamContext ( Psr\Http\Message\StreamInterface $stream )
 

Creates a stream context that can be used to open a stream as a php stream resource.

  • return resource
public static getResource ( Psr\Http\Message\StreamInterface $stream )
 

Returns a resource representing the stream.

  • param StreamInterface $stream The stream to get a resource for
  • return resource
  • throws InvalidArgumentException if stream is not readable or writable
public static register () : void
 

Registers the stream wrapper if needed

public stream_cast ( int $cast_as )
 
  • return resource | false
public stream_eof () : bool
public stream_open ( string $path , string $mode , int $options , ? string $opened_path = NULL ) : bool
public stream_read ( int $count ) : string
public stream_seek ( int $offset , int $whence ) : bool
public stream_stat () : array
 
  • return array | string,int>
public stream_tell () : int
public stream_write ( string $data ) : int
public url_stat ( string $path , int $flags ) : array
 
  • return array | string,int>
Properties
private $mode
 
  • var string r, r+, or w
private $stream
 
  • var StreamInterface
Methods
public static createStreamContext ( Psr\Http\Message\StreamInterface $stream )
 

Creates a stream context that can be used to open a stream as a php stream resource.

  • return resource
public static getResource ( Psr\Http\Message\StreamInterface $stream )
 

Returns a resource representing the stream.

  • param StreamInterface $stream The stream to get a resource for
  • return resource
  • throws InvalidArgumentException if stream is not readable or writable
public static register () : void
 

Registers the stream wrapper if needed

© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration