Copied!

Converts Guzzle streams into PHP stream resources.

  • see https://www.php.net/streamwrapper
CloneableFinalInstantiable
Properties
public $context = NULL
 
  • 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()
 
  • return array{dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}|false
public stream_tell() : int
public stream_write(string $data) : int
public url_stat(string $path, int $flags) : array
 
  • return array{dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}
Properties
private $mode = NULL
 
  • var string r, r+, or w
private $stream = NULL
 
  • 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

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration